[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190506143054.443262341@linuxfoundation.org>
Date: Mon, 6 May 2019 16:31:39 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Charles Keepax <ckeepax@...nsource.cirrus.com>,
Benjamin Tissoires <benjamin.tissoires@...hat.com>,
Wolfram Sang <wsa@...-dreams.de>
Subject: [PATCH 4.19 06/99] i2c: Remove unnecessary call to irq_find_mapping
From: Charles Keepax <ckeepax@...nsource.cirrus.com>
commit b9bb3fdf4e870fb655064f5c3c81c1fee7fd89ce upstream.
irq_create_mapping calls irq_find_mapping internally and will use the
found mapping if one exists, so there is no need to manually call this
from i2c_smbus_host_notify_to_irq.
Signed-off-by: Charles Keepax <ckeepax@...nsource.cirrus.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@...hat.com>
Signed-off-by: Wolfram Sang <wsa@...-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/i2c/i2c-core-base.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- 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(
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;
}
Powered by blists - more mailing lists