[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHc1_P5fnWYw4i2kBdAg1MtChD673g3j_mL+=Mg70ptLpeaCjw@mail.gmail.com>
Date: Tue, 20 Jan 2026 21:29:50 +0530
From: Shrikant <raskar.shree97@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...el.com>
Cc: Jonathan Cameron <jic23@...nel.org>, David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>, skhan@...uxfoundation.org, david.hunter.linux@...il.com,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 3/5] iio: proximity: rfd77402: Add interrupt handling support
> > > > + i2c_set_clientdata(client, indio_dev);
> > >
> > > Is it used?
> > Yes, it is used in rfd77402_init().
>
> Can it be passed directly?
>
> In other words, can we refactor code to get rid of the i2c_set_clientdata() and
> respective getter calls?
Yes, I can pass struct rfd77402_data *data as an argument to rfd77402_init() and
then I can avoid the i2c_set_clientdata() and respective getter calls.
But for that I
also need to update the rfd77402_resume() as below:
static int rfd77402_resume(struct device *dev)
{
struct iio_dev *indio_dev = dev_get_drvdata(dev);
struct rfd77402_data *data = iio_priv(indio_dev);
return rfd77402_init(data);
}
Let me know your feedback on it.
Regards,
Shrikant
Powered by blists - more mailing lists