[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1807051129060.21087@fox.voss.local>
Date: Thu, 5 Jul 2018 11:30:37 +0200 (CEST)
From: Nikolaus Voss <nikolaus.voss@...wensteinmedical.de>
To: Andy Shevchenko <andy.shevchenko@...il.com>
cc: "Voss, Dr. Nikolaus" <Nikolaus.Dr.Voss@...wensteinmedical.de>,
Jonathan Cameron <jic23@...nel.org>,
Hartmut Knaack <knaack.h@....de>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald-Stadler <pmeerw@...erw.net>,
Lorenzo Bianconi <lorenzo.bianconi83@...il.com>,
Linus Walleij <linus.walleij@...aro.org>,
Xiongfeng Wang <xiongfeng.wang@...aro.org>,
Javier Martinez Canillas <javier@...hile0.org>,
"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 1/2] IIO: st_accel_i2c.c: Simplify access to driver
data
On Wed, 4 Jul 2018, Andy Shevchenko wrote:
> On Tue, Jul 3, 2018 at 8:41 AM, Nikolaus Voss
> <nikolaus.voss@...wensteinmedical.de> wrote:
>> 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.
>>
>
> Couple of comments below, otherwise
>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
>
>> Signed-off-by: Nikolaus Voss <nikolaus.voss@...wensteinmedical.de>
>> ---
>> drivers/iio/accel/st_accel_i2c.c | 56 ++++++++++++++------------------
>> 1 file changed, 24 insertions(+), 32 deletions(-)
>>
>> diff --git a/drivers/iio/accel/st_accel_i2c.c b/drivers/iio/accel/st_accel_i2c.c
>> index 6bdec8c451e0..c6e08c834f11 100644
>> --- a/drivers/iio/accel/st_accel_i2c.c
>> +++ b/drivers/iio/accel/st_accel_i2c.c
>> @@ -14,8 +14,8 @@
>> #include <linux/acpi.h>
>> #include <linux/i2c.h>
>> #include <linux/iio/iio.h>
>> +#include <linux/property.h>
>>
>> -#include <linux/iio/common/st_sensors.h>
>> #include <linux/iio/common/st_sensors_i2c.h>
>> #include "st_accel.h"
>>
>> @@ -107,7 +107,7 @@ MODULE_DEVICE_TABLE(of, st_accel_of_match);
>>
>> #ifdef CONFIG_ACPI
>> static const struct acpi_device_id st_accel_acpi_match[] = {
>> - {"SMO8A90", LNG2DM},
>> + {"SMO8A90", (kernel_ulong_t)LNG2DM_ACCEL_DEV_NAME},
>> { },
>
> Is it done against iio-next?
>
> I see two records in this table.
No, I'll rebase onto linux-next and resend...
Niko
...
Powered by blists - more mailing lists