Skip to contentSkip to conversation

media: v4l2-core: Replace the check for firmware registered I²C devices

PATCH Superseded Andy Shevchenko 1 participant 2 messages Mar 12, 2025 1 message not in the archive Media (V4L/DVB)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: v4l2-core: Replace the check for firmware registered I²C devices

Replace the check for firmware registered I²C devices as the firmware node independently on type should be retrieved via dev_fwnode().

---
 drivers/media/v4l2-core/v4l2-i2c.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/v4l2-core/v4l2-i2c.c +2 -1
index 586c46544255..3b83223182a8 100644
@@ -5,6 +5,7 @@
 
 #include <linux/i2c.h>
 #include <linux/module.h>
+#include <linux/property.h>
 #include <media/v4l2-common.h>
 #include <media/v4l2-device.h>
 
@@ -24,7 +25,7 @@ void v4l2_i2c_subdev_unregister(struct v4l2_subdev *sd)
 	 * registered by us, and would not be
 	 * re-created by just probing the V4L2 driver.
 	 */
-	if (client && !client->dev.of_node && !client->dev.fwnode)
+	if (client && !dev_fwnode(&client->dev)
 		i2c_unregister_device(client);
 }
 
Signature · 1 line
2.47.2

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 4 lines · Patchwork Integration

Dear Andy Shevchenko:

Thanks for your patches! Unfortunately the Media CI robot detected some issues:

Cool, I have been under impression that I compiled it...
Now I see that it was different configuration (and actually different branch). I will fix and send a v2 for this.

Signature · 2 lines
With Best Regards,
Andy Shevchenko