Re: [PATCH v13 3/3] iio: adc: ad7173: add AD7173 driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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






[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux