IIO: st_accel_i2c.c: Simplify access to driver data
authorNikolaus Voss <nikolaus.voss@loewensteinmedical.de>
Tue, 3 Jul 2018 05:41:00 +0000 (07:41 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 7 Jul 2018 16:32:51 +0000 (17:32 +0100)
commit19868faad4c59646a9fbebc34c3bf07733db341e
tree851b999cdee6647f757fc655d796c126fbf3ab13
parent7d6cd21d82bacab2d1786fe5e989e4815b75d9a3
IIO: st_accel_i2c.c: Simplify access to driver data

Use device_get_match_data API to simplify access to driver data.
Let acpi_device_id table entries point to the same driver data as
of_device_id table entries and uniquify access to driver data by using
device_get_match_data API. Remove unused i2c_device_id .driver_data
fields.

Signed-off-by: Nikolaus Voss <nikolaus.voss@loewensteinmedical.de>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/st_accel_i2c.c