RE: [PATCH 3/4] iio: potentiometer: mcp4531: Use i2c_get_match_data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I would like to drop this patch, as this driver does not have similar
I2C and DT-based matching table.

Cheers,
Biju

> -----Original Message-----
> From: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> Sent: Sunday, July 16, 2023 6:52 PM
> To: Peter Rosin <peda@xxxxxxxxxx>; Jonathan Cameron <jic23@xxxxxxxxxx>
> Cc: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>; Lars-Peter Clausen
> <lars@xxxxxxxxxx>; linux-iio@xxxxxxxxxxxxxxx; Geert Uytterhoeven
> <geert+renesas@xxxxxxxxx>; Prabhakar Mahadev Lad <prabhakar.mahadev-
> lad.rj@xxxxxxxxxxxxxx>; linux-renesas-soc@xxxxxxxxxxxxxxx
> Subject: [PATCH 3/4] iio: potentiometer: mcp4531: Use i2c_get_match_data
> 
> Replace of_device_get_match_data() and i2c_match_id() by i2c_get_match
> _data() as we have similar I2C and DT-based matching table.
> 
> Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> ---
>  drivers/iio/potentiometer/mcp4531.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/potentiometer/mcp4531.c
> b/drivers/iio/potentiometer/mcp4531.c
> index c513c00c8243..08e7af710e1f 100644
> --- a/drivers/iio/potentiometer/mcp4531.c
> +++ b/drivers/iio/potentiometer/mcp4531.c
> @@ -368,9 +368,9 @@ static int mcp4531_probe(struct i2c_client *client)
>  	i2c_set_clientdata(client, indio_dev);
>  	data->client = client;
> 
> -	data->cfg = device_get_match_data(dev);
> +	data->cfg = i2c_get_match_data(client);
>  	if (!data->cfg)
> -		data->cfg = &mcp4531_cfg[i2c_match_id(mcp4531_id, client)-
> >driver_data];
> +		return -ENODEV;
> 
>  	indio_dev->info = &mcp4531_info;
>  	indio_dev->channels = mcp4531_channels;
> --
> 2.25.1





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux