diff options
author | Corey Minyard <cminyard@mvista.com> | 2019-11-21 12:10:51 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2019-11-25 19:13:34 +0300 |
commit | dca0dd28fa5e0a1ec41a623dbaf667601fc62331 (patch) | |
tree | 192bcc6a900be8e0c3d5906ba932b34fbe51b598 /drivers/i2c | |
parent | 790591f41ede7b6fcfea8753dfb4030752dbfbec (diff) | |
download | linux-dca0dd28fa5e0a1ec41a623dbaf667601fc62331.tar.xz |
i2c: smbus: Don't filter out duplicate alerts
Getting the same alert twice in a row is legal and normal,
especially on a fast device (like running in qemu). Kind of
like interrupts. So don't report duplicate alerts, and deliver
them normally.
[JD: Fixed subject]
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/i2c-smbus.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/i2c/i2c-smbus.c b/drivers/i2c/i2c-smbus.c index 03096f47e6ab..7e2f5d0eacdb 100644 --- a/drivers/i2c/i2c-smbus.c +++ b/drivers/i2c/i2c-smbus.c @@ -66,7 +66,6 @@ static irqreturn_t smbus_alert(int irq, void *d) { struct i2c_smbus_alert *alert = d; struct i2c_client *ara; - unsigned short prev_addr = 0; /* Not a valid address */ ara = alert->ara; @@ -90,18 +89,12 @@ static irqreturn_t smbus_alert(int irq, void *d) data.addr = status >> 1; data.type = I2C_PROTOCOL_SMBUS_ALERT; - if (data.addr == prev_addr) { - dev_warn(&ara->dev, "Duplicate SMBALERT# from dev " - "0x%02x, skipping\n", data.addr); - break; - } dev_dbg(&ara->dev, "SMBALERT# from dev 0x%02x, flag %d\n", data.addr, data.data); /* Notify driver for the device which issued the alert */ device_for_each_child(&ara->adapter->dev, &data, smbus_do_alert); - prev_addr = data.addr; } return IRQ_HANDLED; |