On Sun, 5 Dec 2021 17:07:37 +0200 Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote: > On Sat, Dec 4, 2021 at 7:07 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote: > > > > From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> > > > > This allows use of the driver with other types of firmware such as ACPI > > PRP0001 based probing. > > > > Also part of a general attempt to remove direct use of of_ specific > > accessors from IIO. > > > > Added an include for mod_devicetable.h whilst here to cover the > > struct of_device_id definition. > > ... > > > -static int mcp3911_config(struct mcp3911 *adc, struct device_node *of_node) > > +static int mcp3911_config(struct mcp3911 *adc, struct device *dev) > > I am wondering if the device pointer is already embedded in the mpc3911. > It might require assignment reordering in the ->probe(). though > (haven't checked). > Good point. adc->spi->dev is available and is the same pointer so might as well use that to keep things a little more tidy. Thanks, Jonathan