lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240903204737.710e49dd@jic23-huawei>
Date: Tue, 3 Sep 2024 20:47:37 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Jonathan Cameron <Jonathan.Cameron@...wei.com>, David Lechner
 <dlechner@...libre.com>, Andy Shevchenko
 <andriy.shevchenko@...ux.intel.com>, Michael Hennerich
 <michael.hennerich@...log.com>, Antoniu Miclaus
 <antoniu.miclaus@...log.com>, Jinjie Ruan <ruanjinjie@...wei.com>, Lorenzo
 Bianconi <lorenzo@...nel.org>, Srinivas Pandruvada
 <srinivas.pandruvada@...ux.intel.com>, Basavaraj Natikar
 <Basavaraj.Natikar@....com>, linux-input@...r.kernel.org,
 linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org, Jiri Kosina
 <jikos@...nel.org>, Lars-Peter Clausen <lars@...afoo.de>
Subject: Re: [PATCH v1 10/22] iio: dac: max517: Get platform data via
 dev_get_platdata()

On Tue,  3 Sep 2024 01:16:55 +0300
Andy Shevchenko <andy.shevchenko@...il.com> wrote:

> From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> 
> Access to platform data via dev_get_platdata() getter to make code cleaner.
> 
> Signed-off-by: Andy Shevchenko <andy.shevchenko@...il.com>
> ---
>  drivers/iio/dac/max517.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/dac/max517.c b/drivers/iio/dac/max517.c
> index 685980184d3c..96781ae04f9d 100644
> --- a/drivers/iio/dac/max517.c
> +++ b/drivers/iio/dac/max517.c
> @@ -143,10 +143,10 @@ static const struct iio_chan_spec max517_channels[] = {
>  
>  static int max517_probe(struct i2c_client *client)
>  {
> +	const struct max517_platform_data *platform_data = dev_get_platdata(&client->dev);
>  	const struct i2c_device_id *id = i2c_client_get_device_id(client);
>  	struct max517_data *data;
>  	struct iio_dev *indio_dev;
> -	struct max517_platform_data *platform_data = client->dev.platform_data;
>  	int chan;
>  
>  	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
> @@ -176,7 +176,7 @@ static int max517_probe(struct i2c_client *client)
>  
>  	/*
>  	 * Reference voltage on MAX518 and default is 5V, else take vref_mv
> -	 * from platform_data
> +	 * from platform_data.

I guess this is accidental?  

J

>  	 */
>  	for (chan = 0; chan < indio_dev->num_channels; chan++) {
>  		if (id->driver_data == ID_MAX518 || !platform_data)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ