summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-11-01 09:31:19 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2018-11-01 09:31:19 -0700
commit7c6c54b505b8aea1782ce6a6e8f3b8297d179937 (patch)
tree4563548b15a6a236c12ee2580678a1f18b30b302 /drivers
parent6444ccfd699cda8db5edaac7fa469d6a29aa9a47 (diff)
parent012ebc3b7801fcf424d0ebb4689c98f90a8593e0 (diff)
Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c fixes from Wolfram Sang: "I2C has a core bugfix & cleanup as well as an ID addition and MAINTAINERS update for you" * 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: MAINTAINERS: add maintainer for IMX LPI2C driver dt-bindings: i2c: i2c-imx-lpi2c: add imx8qxp compatible string i2c: Clear client->irq in i2c_device_remove i2c: Remove unnecessary call to irq_find_mapping
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/i2c-core-base.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index dc78aa7369de..28460f6a60cc 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -306,10 +306,7 @@ static int i2c_smbus_host_notify_to_irq(const struct i2c_client *client)
if (client->flags & I2C_CLIENT_TEN)
return -EINVAL;
- irq = irq_find_mapping(adap->host_notify_domain, client->addr);
- if (!irq)
- irq = irq_create_mapping(adap->host_notify_domain,
- client->addr);
+ irq = irq_create_mapping(adap->host_notify_domain, client->addr);
return irq > 0 ? irq : -ENXIO;
}
@@ -433,6 +430,8 @@ static int i2c_device_remove(struct device *dev)
dev_pm_clear_wake_irq(&client->dev);
device_init_wakeup(&client->dev, false);
+ client->irq = 0;
+
return status;
}