From: Andy Shevchenko Date: Mon, 12 Jan 2026 13:22:41 +0000 (+0100) Subject: i2c: core: Replace custom implementation of device_match_fwnode() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=861e0f8d81d727389311b58539952d0ca2095b9d;p=thirdparty%2Flinux.git i2c: core: Replace custom implementation of device_match_fwnode() Replace custom implementation of the device_match_fwnode(). Signed-off-by: Andy Shevchenko Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index 41c2e46ffb24..b9b44bed3243 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -1852,10 +1852,10 @@ EXPORT_SYMBOL_GPL(devm_i2c_add_adapter); static int i2c_dev_or_parent_fwnode_match(struct device *dev, const void *data) { - if (dev_fwnode(dev) == data) + if (device_match_fwnode(dev, data)) return 1; - if (dev->parent && dev_fwnode(dev->parent) == data) + if (dev->parent && device_match_fwnode(dev->parent, data)) return 1; return 0;