lkml.org 
[lkml]   [2022]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/3] iio: imu: adis16480: Use temporary variable for struct device
On Thu, 14 Apr 2022 16:15:58 +0300
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> Use temporary variable for struct device to make code neater.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Reviewed-by: Nuno Sá <nuno.sa@analog.com>
> ---
> v2: added tag (Nuno)
> drivers/iio/imu/adis16480.c | 46 ++++++++++++++++++-------------------
> 1 file changed, 23 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/iio/imu/adis16480.c b/drivers/iio/imu/adis16480.c
> index 68eed088cca6..287914016f28 100644
> --- a/drivers/iio/imu/adis16480.c
> +++ b/drivers/iio/imu/adis16480.c
...

> @@ -1216,12 +1217,12 @@ static const struct iio_info adis16480_info = {
> static int adis16480_stop_device(struct iio_dev *indio_dev)
> {
> struct adis16480 *st = iio_priv(indio_dev);
> + struct device *dev = &st->adis.spi->dev;
> int ret;
>
> ret = adis_write_reg_16(&st->adis, ADIS16480_REG_SLP_CNT, BIT(9));
> if (ret)
> - dev_err(&indio_dev->dev,
> - "Could not power down device: %d\n", ret);
> + dev_err(dev, "Could not power down device: %d\n", ret);
>

Subtle but this is a functional change. I think it's an improvement
to use the spi dev, but if anyone sees this error message it will
be different as a result, so ideally the patch description
would have mentioned this. Meh. It's trivial so I don't really care
enough for a v3 or to modify it whilst applying :)

So fine as is, but I thought I'd call it out anyway.

Jonathan

\
 
 \ /
  Last update: 2022-04-15 20:03    [W:1.971 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site