diff options
Diffstat (limited to 'drivers/i2c/i2c-core-base.c')
-rw-r--r-- | drivers/i2c/i2c-core-base.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index b70c2a9a342f..d9b6341f9fd1 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c | |||
@@ -322,6 +322,8 @@ static int i2c_device_probe(struct device *dev) | |||
322 | 322 | ||
323 | driver = to_i2c_driver(dev->driver); | 323 | driver = to_i2c_driver(dev->driver); |
324 | 324 | ||
325 | client->irq = client->init_irq; | ||
326 | |||
325 | if (!client->irq && !driver->disable_i2c_core_irq_mapping) { | 327 | if (!client->irq && !driver->disable_i2c_core_irq_mapping) { |
326 | int irq = -ENOENT; | 328 | int irq = -ENOENT; |
327 | 329 | ||
@@ -432,7 +434,7 @@ static int i2c_device_remove(struct device *dev) | |||
432 | dev_pm_clear_wake_irq(&client->dev); | 434 | dev_pm_clear_wake_irq(&client->dev); |
433 | device_init_wakeup(&client->dev, false); | 435 | device_init_wakeup(&client->dev, false); |
434 | 436 | ||
435 | client->irq = client->init_irq; | 437 | client->irq = 0; |
436 | if (client->flags & I2C_CLIENT_HOST_NOTIFY) | 438 | if (client->flags & I2C_CLIENT_HOST_NOTIFY) |
437 | pm_runtime_put(&client->adapter->dev); | 439 | pm_runtime_put(&client->adapter->dev); |
438 | 440 | ||
@@ -749,7 +751,6 @@ i2c_new_client_device(struct i2c_adapter *adap, struct i2c_board_info const *inf | |||
749 | if (!client->init_irq) | 751 | if (!client->init_irq) |
750 | client->init_irq = i2c_dev_irq_from_resources(info->resources, | 752 | client->init_irq = i2c_dev_irq_from_resources(info->resources, |
751 | info->num_resources); | 753 | info->num_resources); |
752 | client->irq = client->init_irq; | ||
753 | 754 | ||
754 | strlcpy(client->name, info->type, sizeof(client->name)); | 755 | strlcpy(client->name, info->type, sizeof(client->name)); |
755 | 756 | ||