From: Lee Jones <lee.jones@linaro.org>
To: Laxman Dewangan <ldewangan@nvidia.com>
Cc: corbet@lwn.net, andreas.werner@men.de, tony@atomide.com,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-omap@vger.kernel.org, patches@opensource.wolfsonmicro.com,
Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH V2 20/20] mfd: wm8400: Use devm_mfd_add_devices() for mfd_device registration
Date: Mon, 11 Apr 2016 10:32:41 +0100 [thread overview]
Message-ID: <20160411093241.GK7994@x1> (raw)
In-Reply-To: <1460054594-32325-21-git-send-email-ldewangan@nvidia.com>
Applied, thanks.
On Fri, 08 Apr 2016, Laxman Dewangan wrote:
> Use devm_mfd_add_devices() for MFD devices registration and get
> rid of .remove callback to remove MFD child-devices. This is done
> by managed device framework.
>
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
> CC: Mark Brown <broonie@kernel.org>
> CC: patches@opensource.wolfsonmicro.com
> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
>
> ---
> Changes from V1:
> - Convert mfd to MFD.
> - Collected acks.
>
> drivers/mfd/wm8400-core.c | 25 +++----------------------
> 1 file changed, 3 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/mfd/wm8400-core.c b/drivers/mfd/wm8400-core.c
> index 3bd44a4..9fd8230 100644
> --- a/drivers/mfd/wm8400-core.c
> +++ b/drivers/mfd/wm8400-core.c
> @@ -70,7 +70,7 @@ static int wm8400_register_codec(struct wm8400 *wm8400)
> .pdata_size = sizeof(*wm8400),
> };
>
> - return mfd_add_devices(wm8400->dev, -1, &cell, 1, NULL, 0, NULL);
> + return devm_mfd_add_devices(wm8400->dev, -1, &cell, 1, NULL, 0, NULL);
> }
>
> /*
> @@ -111,7 +111,7 @@ static int wm8400_init(struct wm8400 *wm8400,
> ret = wm8400_register_codec(wm8400);
> if (ret != 0) {
> dev_err(wm8400->dev, "Failed to register codec\n");
> - goto err_children;
> + return ret;
> }
>
> if (pdata && pdata->platform_init) {
> @@ -119,21 +119,12 @@ static int wm8400_init(struct wm8400 *wm8400,
> if (ret != 0) {
> dev_err(wm8400->dev, "Platform init failed: %d\n",
> ret);
> - goto err_children;
> + return ret;
> }
> } else
> dev_warn(wm8400->dev, "No platform initialisation supplied\n");
>
> return 0;
> -
> -err_children:
> - mfd_remove_devices(wm8400->dev);
> - return ret;
> -}
> -
> -static void wm8400_release(struct wm8400 *wm8400)
> -{
> - mfd_remove_devices(wm8400->dev);
> }
>
> static const struct regmap_config wm8400_regmap_config = {
> @@ -176,15 +167,6 @@ static int wm8400_i2c_probe(struct i2c_client *i2c,
> return wm8400_init(wm8400, dev_get_platdata(&i2c->dev));
> }
>
> -static int wm8400_i2c_remove(struct i2c_client *i2c)
> -{
> - struct wm8400 *wm8400 = i2c_get_clientdata(i2c);
> -
> - wm8400_release(wm8400);
> -
> - return 0;
> -}
> -
> static const struct i2c_device_id wm8400_i2c_id[] = {
> { "wm8400", 0 },
> { }
> @@ -196,7 +178,6 @@ static struct i2c_driver wm8400_i2c_driver = {
> .name = "WM8400",
> },
> .probe = wm8400_i2c_probe,
> - .remove = wm8400_i2c_remove,
> .id_table = wm8400_i2c_id,
> };
> #endif
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
prev parent reply other threads:[~2016-04-11 9:32 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 ` [PATCH V2 12/20] mfd: rk808: " Laxman Dewangan
2016-04-11 9:31 ` 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 [this message]
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=20160411093241.GK7994@x1 \
--to=lee.jones@linaro.org \
--cc=andreas.werner@men.de \
--cc=broonie@kernel.org \
--cc=corbet@lwn.net \
--cc=ldewangan@nvidia.com \
--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 \
/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