From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linuxarm@huawei.com, mauro.chehab@huawei.com,
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
"Lee Jones" <lee.jones@linaro.org>,
linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev
Subject: [PATCH v8 05/12] staging: hi6421-spmi-pmic: use devm_request_threaded_irq()
Date: Fri, 25 Jun 2021 09:45:57 +0200 [thread overview]
Message-ID: <b47827c3466eeef3a7de6ac56b1fe93b5ff84e30.1624606660.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1624606660.git.mchehab+huawei@kernel.org>
Use devm_request_threaded_irq() in order to simplify the
driver.
Suggested-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
drivers/staging/hikey9xx/hi6421-spmi-pmic.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/hikey9xx/hi6421-spmi-pmic.c b/drivers/staging/hikey9xx/hi6421-spmi-pmic.c
index 29ac53684ad2..2b55acdaad85 100644
--- a/drivers/staging/hikey9xx/hi6421-spmi-pmic.c
+++ b/drivers/staging/hikey9xx/hi6421-spmi-pmic.c
@@ -250,9 +250,11 @@ static int hi6421_spmi_pmic_probe(struct spmi_device *pdev)
ddata->irqs[i] = virq;
}
- ret = request_threaded_irq(ddata->irq, hi6421_spmi_irq_handler, NULL,
- IRQF_TRIGGER_LOW | IRQF_SHARED | IRQF_NO_SUSPEND,
- "pmic", ddata);
+ ret = devm_request_threaded_irq(dev,
+ ddata->irq, hi6421_spmi_irq_handler,
+ NULL,
+ IRQF_TRIGGER_LOW | IRQF_SHARED | IRQF_NO_SUSPEND,
+ "pmic", ddata);
if (ret < 0) {
dev_err(dev, "Failed to start IRQ handling thread: error %d\n",
ret);
@@ -270,13 +272,6 @@ static int hi6421_spmi_pmic_probe(struct spmi_device *pdev)
return ret;
}
-static void hi6421_spmi_pmic_remove(struct spmi_device *pdev)
-{
- struct hi6421_spmi_pmic *ddata = dev_get_drvdata(&pdev->dev);
-
- free_irq(ddata->irq, ddata);
-}
-
static const struct of_device_id pmic_spmi_id_table[] = {
{ .compatible = "hisilicon,hi6421-spmi" },
{ }
@@ -289,7 +284,6 @@ static struct spmi_driver hi6421_spmi_pmic_driver = {
.of_match_table = pmic_spmi_id_table,
},
.probe = hi6421_spmi_pmic_probe,
- .remove = hi6421_spmi_pmic_remove,
};
module_spmi_driver(hi6421_spmi_pmic_driver);
--
2.31.1
next prev parent reply other threads:[~2021-06-25 7:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-25 7:45 [PATCH v8 00/12] Move Hisilicon 6421v600 SPMI and USB drivers out of staging Mauro Carvalho Chehab
2021-06-25 7:45 ` [PATCH v8 01/12] phy: phy-hi3670-usb3: move driver from staging into phy Mauro Carvalho Chehab
2021-06-25 7:45 ` [PATCH v8 02/12] spmi: hisi-spmi-controller: move driver from staging Mauro Carvalho Chehab
2021-07-01 14:02 ` Rob Herring
2021-06-25 7:45 ` [PATCH v8 03/12] staging: hisilicon,hi6421-spmi-pmic.yaml: cleanup descriptions Mauro Carvalho Chehab
2021-06-25 7:45 ` [PATCH v8 04/12] staging: hi6421-spmi-pmic: update copyright's year Mauro Carvalho Chehab
2021-06-25 8:01 ` Greg Kroah-Hartman
2021-06-25 7:45 ` Mauro Carvalho Chehab [this message]
2021-06-25 7:45 ` [PATCH v8 06/12] staging: hi6421-spmi-pmic: better name IRQs Mauro Carvalho Chehab
2021-06-25 7:45 ` [PATCH v8 07/12] staging: hi6421-spmi-pmic: change a return code Mauro Carvalho Chehab
2021-06-25 7:46 ` [PATCH v8 08/12] staging: hi6421-spmi-pmic: change identation of a table Mauro Carvalho Chehab
2021-06-25 7:46 ` [PATCH v8 09/12] staging: hi6421-spmi-pmic: cleanup some macros Mauro Carvalho Chehab
2021-06-25 7:46 ` [PATCH v8 10/12] mfd: hi6421-spmi-pmic: move driver from staging Mauro Carvalho Chehab
2021-06-25 8:07 ` [PATCH v8 00/12] Move Hisilicon 6421v600 SPMI and USB drivers out of staging Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b47827c3466eeef3a7de6ac56b1fe93b5ff84e30.1624606660.git.mchehab+huawei@kernel.org \
--to=mchehab+huawei@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=linuxarm@huawei.com \
--cc=mauro.chehab@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).