Re: [PATCH v2 1/2] IIO: st_accel_i2c.c: Simplify access to driver data

2018-07-04 Thread Andy Shevchenko
On Wed, Jul 4, 2018 at 9:56 AM, Nikolaus Voss wrote: > On Wed, 4 Jul 2018, Andy Shevchenko wrote: >> >> On Tue, Jul 3, 2018 at 8:41 AM, Nikolaus Voss >> wrote: >>> >>> Use device_get_match_data API to simplify access to driver data. >> >> >> ..._data() >> >> But. You actually don't use it below.

Re: [PATCH v2 1/2] IIO: st_accel_i2c.c: Simplify access to driver data

2018-07-03 Thread Nikolaus Voss
On Wed, 4 Jul 2018, Andy Shevchenko wrote: On Tue, Jul 3, 2018 at 8:41 AM, Nikolaus Voss wrote: Use device_get_match_data API to simplify access to driver data. ..._data() But. You actually don't use it below. It is used, see below. Let acpi_device_id table entries point to the same dr

Re: [PATCH v2 1/2] IIO: st_accel_i2c.c: Simplify access to driver data

2018-07-03 Thread Andy Shevchenko
On Tue, Jul 3, 2018 at 8:41 AM, Nikolaus Voss wrote: > Use device_get_match_data API to simplify access to driver data. ..._data() But. You actually don't use it below. > Let acpi_device_id table entries point to the same driver data as > of_device_id table entries and uniquify access to driver

[PATCH v2 1/2] IIO: st_accel_i2c.c: Simplify access to driver data

2018-07-03 Thread Nikolaus Voss
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. Signed-off-by: Nikolaus Voss --- drivers/iio/accel/st_accel_i2c.c |