summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2025-03-13 13:30:34 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2025-06-17 10:35:13 +0200
commitad7fbb1624e8d1ef7e219cb76ce9d7edcabc68ee (patch)
tree3977ba576ec4b4bccfef03a1c27226c705720dd7 /drivers
parent9e2c1e8cfb8e83f891cdc16220adf162a3d93066 (diff)
media: v4l2-core: Replace the check for firmware registered I2C devices
Replace the check for firmware registered I²C devices as the firmware node independently on type should be retrieved via dev_fwnode(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/v4l2-core/v4l2-i2c.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/v4l2-core/v4l2-i2c.c b/drivers/media/v4l2-core/v4l2-i2c.c
index 586c46544255..ffc64e10fcae 100644
--- a/drivers/media/v4l2-core/v4l2-i2c.c
+++ b/drivers/media/v4l2-core/v4l2-i2c.c
@@ -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);
}