mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 20:51:44 +00:00
iio:accel:mxc4005: Drop unnecessary explicit casts in regmap_bulk_read calls
regmap_bulk_read takes a void * for its val parameter. It certainly makes no sense to cast to a (u8 *) + no need to explicitly cast at all when converting another pointer type to void *. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
This commit is contained in:
parent
780f1c1761
commit
b01401a228
@ -135,7 +135,7 @@ static int mxc4005_read_xyz(struct mxc4005_data *data)
|
||||
int ret;
|
||||
|
||||
ret = regmap_bulk_read(data->regmap, MXC4005_REG_XOUT_UPPER,
|
||||
(u8 *) data->buffer, sizeof(data->buffer));
|
||||
data->buffer, sizeof(data->buffer));
|
||||
if (ret < 0) {
|
||||
dev_err(data->dev, "failed to read axes\n");
|
||||
return ret;
|
||||
@ -150,7 +150,7 @@ static int mxc4005_read_axis(struct mxc4005_data *data,
|
||||
__be16 reg;
|
||||
int ret;
|
||||
|
||||
ret = regmap_bulk_read(data->regmap, addr, (u8 *) ®, sizeof(reg));
|
||||
ret = regmap_bulk_read(data->regmap, addr, ®, sizeof(reg));
|
||||
if (ret < 0) {
|
||||
dev_err(data->dev, "failed to read reg %02x\n", addr);
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user