From: Stephan Gerhold <stephan@gerhold.net>
To: Chanwoo Choi <cw00.choi@samsung.com>,
MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Rob Herring <robh+dt@kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Nikita Travkin <nikita@trvn.ru>,
~postmarketos/upstreaming@lists.sr.ht,
Stephan Gerhold <stephan@gerhold.net>
Subject: [PATCH 1/6] extcon: sm5502: Use devm_regmap_add_irq_chip()
Date: Thu, 20 May 2021 13:23:29 +0200 [thread overview]
Message-ID: <20210520112334.129556-2-stephan@gerhold.net> (raw)
In-Reply-To: <20210520112334.129556-1-stephan@gerhold.net>
Use devm_regmap_add_irq_chip() to avoid having to remove the
irqchip explicitly in sm5502_muic_i2c_remove().
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
drivers/extcon/extcon-sm5502.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/extcon/extcon-sm5502.c b/drivers/extcon/extcon-sm5502.c
index db41d1c58efd..f0d155cf7518 100644
--- a/drivers/extcon/extcon-sm5502.c
+++ b/drivers/extcon/extcon-sm5502.c
@@ -600,8 +600,8 @@ static int sm5022_muic_i2c_probe(struct i2c_client *i2c,
/* Support irq domain for SM5502 MUIC device */
irq_flags = IRQF_TRIGGER_FALLING | IRQF_ONESHOT | IRQF_SHARED;
- ret = regmap_add_irq_chip(info->regmap, info->irq, irq_flags, 0,
- &sm5502_muic_irq_chip, &info->irq_data);
+ ret = devm_regmap_add_irq_chip(info->dev, info->regmap, info->irq, irq_flags,
+ 0, &sm5502_muic_irq_chip, &info->irq_data);
if (ret != 0) {
dev_err(info->dev, "failed to request IRQ %d: %d\n",
info->irq, ret);
@@ -661,15 +661,6 @@ static int sm5022_muic_i2c_probe(struct i2c_client *i2c,
return 0;
}
-static int sm5502_muic_i2c_remove(struct i2c_client *i2c)
-{
- struct sm5502_muic_info *info = i2c_get_clientdata(i2c);
-
- regmap_del_irq_chip(info->irq, info->irq_data);
-
- return 0;
-}
-
static const struct of_device_id sm5502_dt_match[] = {
{ .compatible = "siliconmitus,sm5502-muic" },
{ },
@@ -714,7 +705,6 @@ static struct i2c_driver sm5502_muic_i2c_driver = {
.of_match_table = sm5502_dt_match,
},
.probe = sm5022_muic_i2c_probe,
- .remove = sm5502_muic_i2c_remove,
.id_table = sm5502_i2c_id,
};
--
2.31.1
next prev parent reply other threads:[~2021-05-20 11:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-20 11:23 [PATCH 0/6] extcon: sm5502: Add support for SM5504 Stephan Gerhold
2021-05-20 11:23 ` Stephan Gerhold [this message]
2021-05-20 11:23 ` [PATCH 2/6] extcon: sm5502: Implement i2c_driver->probe_new() Stephan Gerhold
2021-05-20 11:23 ` [PATCH 3/6] extcon: sm5502: Drop invalid register write in sm5502_reg_data Stephan Gerhold
2021-05-20 11:23 ` [PATCH 4/6] dt-bindings: extcon: sm5502: Convert to DT schema Stephan Gerhold
2021-05-20 11:23 ` [PATCH 5/6] dt-bindings: extcon: sm5502: Document siliconmitus,sm5504-muic Stephan Gerhold
2021-05-20 11:23 ` [PATCH 6/6] extcon: sm5502: Add support for SM5504 Stephan Gerhold
2021-05-24 0:54 ` kernel test robot
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=20210520112334.129556-2-stephan@gerhold.net \
--to=stephan@gerhold.net \
--cc=cw00.choi@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=nikita@trvn.ru \
--cc=robh+dt@kernel.org \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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).