[PATCH v3 4/5] i2c: xiic: switch to generic device property accessors
Andy Shevchenko
andriy.shevchenko at intel.com
Fri Jan 23 00:33:37 PST 2026
On Fri, Jan 23, 2026 at 08:02:47AM +0000, Abdurrahman Hussain via B4 Relay wrote:
> Use generic device property accessors.
...
> + data = device_get_match_data(&pdev->dev);
Should use 'dev'.
> + if (data)
> i2c->quirks = data->quirks;
...
> + device_set_node(&i2c->adap.dev, dev_fwnode(&pdev->dev));
Ditto.
> + ret = device_property_read_u32(&pdev->dev, "clock-frequency",
> + &i2c->i2c_clk);
Ditto and it will be a single line, I think.
ret = device_property_read_u32(dev, "clock-frequency", &i2c->i2c_clk);
(yep, only 78 characters).
...
> - of_property_read_bool(pdev->dev.of_node, "single-master");
> + device_property_read_bool(&pdev->dev, "single-master");
Use 'dev'.
--
With Best Regards,
Andy Shevchenko
More information about the linux-arm-kernel
mailing list