Thread (19 messages) 19 messages, 4 authors, 2026-01-23

Re: [PATCH v3 4/5] i2c: xiic: switch to generic device property accessors

From: Andy Shevchenko <hidden>
Date: 2026-01-23 08:33:41
Also in: linux-i2c, lkml

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


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help