[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAE3SzaSvhSY2V3rVbO3T-qso-uoo01YeMR0=H-PHwBDj8ZsbBQ@mail.gmail.com>
Date: Thu, 14 Aug 2025 09:19:46 +0530
From: Akshay Jindal <akshayaj.lkd@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...el.com>
Cc: anshulusr@...il.com, jic23@...nel.org, dlechner@...libre.com,
nuno.sa@...log.com, andy@...nel.org, shuah@...nel.org,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] iio: light: ltr390: Add device powerdown functionality
via devm api
On Thu, Aug 14, 2025 at 3:13 AM Andy Shevchenko
<andriy.shevchenko@...el.com> wrote:
>
> On Wed, Aug 13, 2025 at 07:27:09PM +0530, Akshay Jindal wrote:
> > I thought so, but removing i2c_set_clientdata would mean that
> > dev->driver_data will NOT contain a pointer to indio_dev.
> > Irrespective of usage, ideally dev->driver_data should contain legit value.
>
> NULL is legit value for driver_data. The rule of thumb is that we don't assign
> something that we know will never be used. Also think about debugging issues,
> with the "legit" value in some pointer it may lead to not noticing a real
> problem or to a problem that never exists if driver_data left untouched.
>
> > Hence I kept it.
> > If you feel otherwise, I can remove it, but I feel this should be kept.
>
> I feel definitely otherwise.
Removed. Floated a v4.
Thanks,
Akshay
Powered by blists - more mailing lists