Re: [PATCH v4 4/7] iio: adc: hx711: introduce hx711_chip_info per-variant structure

Jonathan Cameron
2026-04-28T17:58:02Z

On Tue, 28 Apr 2026 04:17:20 +0530
Piyush Patle <piyushpatle228@gmail.com> wrote:

> On Mon, Apr 27, 2026 at 7:44 PM Andy Shevchenko
> <andriy.shevchenko@intel.com> wrote:
> >
> > On Mon, Apr 27, 2026 at 05:08:17PM +0300, Andy Shevchenko wrote:
> > > On Mon, Apr 27, 2026 at 03:39:35PM +0530, Piyush Patle wrote:
> >
> > ...
> >
> > > > + chip_info = device_get_match_data(dev);
> > > > + if (!chip_info)
> > > > + return dev_err_probe(dev, -ENODEV, "missing match data\n");
> > >
> > > Since we are here, it's not match data, it's driver data. "missing driver data".
> >
> > And does it need property.h to be included?
> >
> property.h is already present in the driver
>
> > Also check if dev_printk.h and errno.h are there (it may be that driver already
> > uses device.h and err.h that cover these two).
> platform_device.h pulls in device.h which covers dev_err_probe().

That's generally not something we'd count as guaranteed for all time so
I'd expect to see dev_printk.h in here. Never include device.h directly
in new code unless you really need to. It's an historical artefact - if
it was already included though because we actually need it then it would
have been fine to assume dev_printk.h was included via device.h

> err.h covers the errno values. No new includes are needed for this patch.
>
> >
> > --
> > With Best Regards,
> > Andy Shevchenko
> >
> >