]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: Clear client->irq in i2c_device_remove
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Fri, 19 Oct 2018 08:59:58 +0000 (09:59 +0100)
committerWolfram Sang <wsa@the-dreams.de>
Wed, 31 Oct 2018 23:33:34 +0000 (23:33 +0000)
commitb6d5d8a9f7a51b9db40da72e7677ad13ed838385
tree45c87c78d6a3e6bb0009dff6ebd50880150d9a52
parent058b2fc11b7cd382a2fb30daf5a1443a4cad3cb9
i2c: Clear client->irq in i2c_device_remove

The IRQ will be mapped in i2c_device_probe only if client->irq is zero and
i2c_device_remove does not clear this. When rebinding an I2C device,
whos IRQ provider has also been rebound this means that an IRQ mapping
will never be created, causing the I2C device to fail to acquire its
IRQ. Fix this issue by clearing client->irq in i2c_device_remove,
forcing i2c_device_probe to lookup the mapping again.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/i2c-core-base.c