Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Andy Shevchenko and committed by
Hans Verkuil
ad7fbb16 9e2c1e8c

+2 -1
+2 -1
drivers/media/v4l2-core/v4l2-i2c.c
··· 5 5 6 6 #include <linux/i2c.h> 7 7 #include <linux/module.h> 8 + #include <linux/property.h> 8 9 #include <media/v4l2-common.h> 9 10 #include <media/v4l2-device.h> 10 11 ··· 25 24 * registered by us, and would not be 26 25 * re-created by just probing the V4L2 driver. 27 26 */ 28 - if (client && !client->dev.of_node && !client->dev.fwnode) 27 + if (client && !dev_fwnode(&client->dev)) 29 28 i2c_unregister_device(client); 30 29 } 31 30