linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laxman Dewangan <ldewangan@nvidia.com>
To: lee.jones@linaro.org, corbet@lwn.net, andreas.werner@men.de,
	tony@atomide.com
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-omap@vger.kernel.org, patches@opensource.wolfsonmicro.com,
	Laxman Dewangan <ldewangan@nvidia.com>,
	Chris Zhong <zyw@rock-chips.com>
Subject: [PATCH V2 12/20] mfd: rk808: Use devm_mfd_add_devices() for mfd_device registration
Date: Fri, 8 Apr 2016 00:13:06 +0530	[thread overview]
Message-ID: <1460054594-32325-13-git-send-email-ldewangan@nvidia.com> (raw)
In-Reply-To: <1460054594-32325-1-git-send-email-ldewangan@nvidia.com>

Use devm_mfd_add_devices() for MFD devices registration and remove
the call of mfd_remove_devices() from .remove callback to remove
MFD child-devices. This is done by managed device framework.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
CC: Chris Zhong <zyw@rock-chips.com>

---
Changes from V1:
- Convert mfd to MFD.
- Run checkpatch with --strict option and fix warning.

 drivers/mfd/rk808.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk808.c
index 4b1e439..49d7f62 100644
--- a/drivers/mfd/rk808.c
+++ b/drivers/mfd/rk808.c
@@ -213,9 +213,9 @@ static int rk808_probe(struct i2c_client *client,
 	rk808->i2c = client;
 	i2c_set_clientdata(client, rk808);
 
-	ret = mfd_add_devices(&client->dev, -1,
-			      rk808s, ARRAY_SIZE(rk808s),
-			      NULL, 0, regmap_irq_get_domain(rk808->irq_data));
+	ret = devm_mfd_add_devices(&client->dev, -1,
+				   rk808s, ARRAY_SIZE(rk808s), NULL, 0,
+				   regmap_irq_get_domain(rk808->irq_data));
 	if (ret) {
 		dev_err(&client->dev, "failed to add MFD devices %d\n", ret);
 		goto err_irq;
@@ -240,7 +240,6 @@ static int rk808_remove(struct i2c_client *client)
 	struct rk808 *rk808 = i2c_get_clientdata(client);
 
 	regmap_del_irq_chip(client->irq, rk808->irq_data);
-	mfd_remove_devices(&client->dev);
 	pm_power_off = NULL;
 
 	return 0;
-- 
2.1.4

  parent reply	other threads:[~2016-04-07 18:43 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07 18:42 [PATCH V2 00/20] mfd: Add devm_ apis for mfd_add_devices and mfd_release_devices Laxman Dewangan
2016-04-07 18:42 ` [PATCH V2 01/20] mfd: Add resource managed apis for mfd_add_devices Laxman Dewangan
2016-04-11  9:15   ` Lee Jones
2016-04-07 18:42 ` [PATCH V2 02/20] mfd: Add devm_mfd_add_devices() in list of managed interfaces Laxman Dewangan
2016-04-11  9:15   ` Lee Jones
2016-04-07 18:42 ` [PATCH V2 03/20] mfd: act8945a: Use devm_mfd_add_devices() for mfd_device registration Laxman Dewangan
2016-04-11  9:15   ` Lee Jones
2016-04-07 18:42 ` [PATCH V2 04/20] mfd: as3711: " Laxman Dewangan
2016-04-11  9:15   ` Lee Jones
2016-04-07 18:42 ` [PATCH V2 05/20] mfd: atmel-hlcdc: " Laxman Dewangan
2016-04-11  9:15   ` Lee Jones
2016-04-07 18:43 ` [PATCH V2 06/20] mfd: bcm590xx: " Laxman Dewangan
2016-04-11  9:15   ` Lee Jones
2016-04-07 18:43 ` [PATCH V2 07/20] mfd: hi6421-pmic: " Laxman Dewangan
2016-04-11  9:15   ` Lee Jones
2016-04-07 18:43 ` [PATCH V2 08/20] mfd: lp3943: " Laxman Dewangan
2016-04-11  9:16   ` Lee Jones
2016-04-07 18:43 ` [PATCH V2 09/20] mfd: menf21bmc: " Laxman Dewangan
2016-04-11  9:16   ` Lee Jones
2016-04-07 18:43 ` [PATCH V2 10/20] mfd: mt6397: " Laxman Dewangan
2016-04-11  9:31   ` Lee Jones
2016-04-07 18:43 ` [PATCH V2 11/20] mfd: rdc321x: " Laxman Dewangan
2016-04-11  9:31   ` Lee Jones
2016-04-07 18:43 ` Laxman Dewangan [this message]
2016-04-11  9:31   ` [PATCH V2 12/20] mfd: rk808: " Lee Jones
2016-04-07 18:43 ` [PATCH V2 13/20] mfd: rn5t618: " Laxman Dewangan
2016-04-11  9:31   ` Lee Jones
2016-04-07 18:43 ` [PATCH V2 14/20] mfd: rt5033: " Laxman Dewangan
2016-04-11  9:31   ` Lee Jones
2016-04-07 18:43 ` [PATCH V2 15/20] mfd: sky81452: " Laxman Dewangan
2016-04-11  9:31   ` Lee Jones
2016-04-07 18:43 ` [PATCH V2 16/20] mfd: stw481x: " Laxman Dewangan
2016-04-11  9:32   ` Lee Jones
2016-04-07 18:43 ` [PATCH V2 17/20] mfd: tps6507x: " Laxman Dewangan
2016-04-11  9:32   ` Lee Jones
2016-04-07 18:43 ` [PATCH V2 18/20] mfd: tps65217: " Laxman Dewangan
2016-04-11  9:32   ` Lee Jones
2016-04-07 18:43 ` [PATCH V2 19/20] mfd: tps65910: " Laxman Dewangan
2016-04-11  9:32   ` Lee Jones
2016-04-07 18:43 ` [PATCH V2 20/20] mfd: wm8400: " Laxman Dewangan
2016-04-11  9:32   ` Lee Jones

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=1460054594-32325-13-git-send-email-ldewangan@nvidia.com \
    --to=ldewangan@nvidia.com \
    --cc=andreas.werner@men.de \
    --cc=corbet@lwn.net \
    --cc=lee.jones@linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=tony@atomide.com \
    --cc=zyw@rock-chips.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).