From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753207AbbLJKMH (ORCPT ); Thu, 10 Dec 2015 05:12:07 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:35987 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750977AbbLJKME (ORCPT ); Thu, 10 Dec 2015 05:12:04 -0500 Message-ID: <1449742318.28989.0.camel@ingics.com> Subject: [PATCH] regulator: pv88090: Fix irq leak From: Axel Lin To: Mark Brown Cc: James Ban , Liam Girdwood , linux-kernel@vger.kernel.org Date: Thu, 10 Dec 2015 18:11:58 +0800 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_request_threaded_irq to ensure the irq is freed when unload the module. Signed-off-by: Axel Lin --- drivers/regulator/pv88090-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/pv88090-regulator.c b/drivers/regulator/pv88090-regulator.c index 3ec5f2b..2513fef 100644 --- a/drivers/regulator/pv88090-regulator.c +++ b/drivers/regulator/pv88090-regulator.c @@ -357,7 +357,7 @@ static int pv88090_i2c_probe(struct i2c_client *i2c, return ret; } - ret = request_threaded_irq(i2c->irq, NULL, + ret = devm_request_threaded_irq(&i2c->dev, i2c->irq, NULL, pv88090_irq_handler, IRQF_TRIGGER_LOW|IRQF_ONESHOT, "pv88090", chip); -- 2.1.4