]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
i2c: core: Use dev_fwnode()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 12 Jan 2026 13:22:42 +0000 (14:22 +0100)
committerWolfram Sang <wsa+renesas@sang-engineering.com>
Wed, 14 Jan 2026 07:02:20 +0000 (08:02 +0100)
irq_domain_create_linear() takes fwnode as the first argument. It can be
extracted from the struct device using dev_fwnode() helper instead of using
direct dereference().

So use the dev_fwnode() helper.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
drivers/i2c/i2c-core-base.c

index b9b44bed324349b9a18a1b6d1b5911fd9c3dc15f..f0fb0cfd56e06205b6c4ab321e8decadc6c602a9 100644 (file)
@@ -1476,7 +1476,7 @@ static int i2c_setup_host_notify_irq_domain(struct i2c_adapter *adap)
        if (!i2c_check_functionality(adap, I2C_FUNC_SMBUS_HOST_NOTIFY))
                return 0;
 
-       domain = irq_domain_create_linear(adap->dev.parent->fwnode,
+       domain = irq_domain_create_linear(dev_fwnode(adap->dev.parent),
                                          I2C_ADDR_7BITS_COUNT,
                                          &i2c_host_notify_irq_ops, adap);
        if (!domain)