[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZdS07T5jJ_pCzRFK@smile.fi.intel.com>
Date: Tue, 20 Feb 2024 16:19:25 +0200
From: Andy Shevchenko <andy@...nel.org>
To: Nuno Sá <noname.nuno@...il.com>
Cc: Dumitru Ceclan <mitrutzceclan@...il.com>, linus.walleij@...aro.org,
brgl@...ev.pl, linux-gpio@...r.kernel.org,
Lars-Peter Clausen <lars@...afoo.de>,
Jonathan Cameron <jic23@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Michael Walle <michael@...le.cc>, Arnd Bergmann <arnd@...db.de>,
ChiaEn Wu <chiaen_wu@...htek.com>,
Niklas Schnelle <schnelle@...ux.ibm.com>,
Leonard Göhrs <l.goehrs@...gutronix.de>,
Mike Looijmans <mike.looijmans@...ic.nl>,
Haibo Chen <haibo.chen@....com>,
Hugo Villeneuve <hvilleneuve@...onoff.com>,
David Lechner <dlechner@...libre.com>,
Ceclan Dumitru <dumitru.ceclan@...log.com>,
linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v13 3/3] iio: adc: ad7173: add AD7173 driver
On Tue, Feb 20, 2024 at 01:20:52PM +0100, Nuno Sá wrote:
> On Tue, 2024-02-20 at 11:43 +0200, Dumitru Ceclan wrote:
..
> Another thing that caught my attention
> > +static int ad7173_register_clk_provider(struct iio_dev *indio_dev)
> > +{
> > + struct ad7173_state *st = iio_priv(indio_dev);
> > + struct device *dev = indio_dev->dev.parent;
> > + struct fwnode_handle *fw_node = dev_fwnode(dev);
Since you used this context, I would also like fw_node to be renamed to fwnode
(in case it will still be used).
> > + struct clk_init_data init = {};
> > + int ret;
> > +
> > + if (!fw_node)
> > + return 0;
>
> I think that better than the above check (do we really have any case where fw_node is
> NULL?) is to have:
>
> if (!IS_ENABLED(CONFIG_COMMON_CLK))
> return 0;
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists