On Fri, Jun 30, 2023 at 2:21 PM Hans de Goede <hdegoede@xxxxxxxxxx> wrote: > > Add a parse_sensor_fwnode callback to ipu_bridge_init(), so that ->parse_sensor_fwnode() > ipu_bridge_init() can be used with other sensor fwnode parse functions > then just ipu_bridge_parse_ssdb(). > > This will allow the ipu3-bridge code to also be used by the atomisp > driver. ... > +int ipu_bridge_init(struct device *dev, > + int (*parse_sensor_fwnode)(struct acpi_device *adev, > + struct ipu_sensor *sensor)) Wondering if typedef ipu_parse_sensor_fwnode_t ... will make all the code better looking. ... > + int (*parse_sensor_fwnode)(struct acpi_device *adev, > + struct ipu_sensor *sensor); Ditto. ... > +int ipu_bridge_init(struct device *dev, > + int (*parse_sensor_fwnode)(struct acpi_device *adev, > + struct ipu_sensor *sensor)); Ditto. ... > +/* Use a define to avoid the parse_sensor_fwnode arg getting evaluated */ @parse_sensor_fwnode argument > +#define ipu_bridge_init(dev, parse_sensor_fwnode) (0) -- With Best Regards, Andy Shevchenko