From: "Kim, Milo" <milo.kim@ti.com>
To: Laxman Dewangan <ldewangan@nvidia.com>
Cc: lee.jones@linaro.org, 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
Subject: Re: [PATCH 08/20] mfd: lp3943: Use devm_mfd_add_devices() for mfd_device registration
Date: Wed, 6 Apr 2016 08:59:10 +0900 [thread overview]
Message-ID: <5704514E.3020603@ti.com> (raw)
In-Reply-To: <1459856912-17859-9-git-send-email-ldewangan@nvidia.com>
On 4/5/2016 8:48 PM, Laxman Dewangan wrote:
> Use devm_mfd_add_devices() for mfd devices registration and get
> rid of .remove callback to remove mfd devices. This is done
> by managed device framework.
>
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
> CC: Milo Kim <milo.kim@ti.com>
Acked-by: Milo Kim <milo.kim@ti.com>
> ---
> drivers/mfd/lp3943.c | 14 +++-----------
> 1 file changed, 3 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/mfd/lp3943.c b/drivers/mfd/lp3943.c
> index eecbb13..65a2a8f1 100644
> --- a/drivers/mfd/lp3943.c
> +++ b/drivers/mfd/lp3943.c
> @@ -123,16 +123,9 @@ static int lp3943_probe(struct i2c_client *cl, const struct i2c_device_id *id)
> lp3943->mux_cfg = lp3943_mux_cfg;
> i2c_set_clientdata(cl, lp3943);
>
> - return mfd_add_devices(dev, -1, lp3943_devs, ARRAY_SIZE(lp3943_devs),
> - NULL, 0, NULL);
> -}
> -
> -static int lp3943_remove(struct i2c_client *cl)
> -{
> - struct lp3943 *lp3943 = i2c_get_clientdata(cl);
> -
> - mfd_remove_devices(lp3943->dev);
> - return 0;
> + return devm_mfd_add_devices(dev, -1, lp3943_devs,
> + ARRAY_SIZE(lp3943_devs),
> + NULL, 0, NULL);
> }
>
> static const struct i2c_device_id lp3943_ids[] = {
> @@ -151,7 +144,6 @@ MODULE_DEVICE_TABLE(of, lp3943_of_match);
>
> static struct i2c_driver lp3943_driver = {
> .probe = lp3943_probe,
> - .remove = lp3943_remove,
> .driver = {
> .name = "lp3943",
> .of_match_table = of_match_ptr(lp3943_of_match),
>
WARNING: multiple messages have this Message-ID (diff)
From: "Kim, Milo" <milo.kim@ti.com>
To: Laxman Dewangan <ldewangan@nvidia.com>
Cc: <lee.jones@linaro.org>, <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>
Subject: Re: [PATCH 08/20] mfd: lp3943: Use devm_mfd_add_devices() for mfd_device registration
Date: Wed, 6 Apr 2016 08:59:10 +0900 [thread overview]
Message-ID: <5704514E.3020603@ti.com> (raw)
In-Reply-To: <1459856912-17859-9-git-send-email-ldewangan@nvidia.com>
On 4/5/2016 8:48 PM, Laxman Dewangan wrote:
> Use devm_mfd_add_devices() for mfd devices registration and get
> rid of .remove callback to remove mfd devices. This is done
> by managed device framework.
>
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
> CC: Milo Kim <milo.kim@ti.com>
Acked-by: Milo Kim <milo.kim@ti.com>
> ---
> drivers/mfd/lp3943.c | 14 +++-----------
> 1 file changed, 3 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/mfd/lp3943.c b/drivers/mfd/lp3943.c
> index eecbb13..65a2a8f1 100644
> --- a/drivers/mfd/lp3943.c
> +++ b/drivers/mfd/lp3943.c
> @@ -123,16 +123,9 @@ static int lp3943_probe(struct i2c_client *cl, const struct i2c_device_id *id)
> lp3943->mux_cfg = lp3943_mux_cfg;
> i2c_set_clientdata(cl, lp3943);
>
> - return mfd_add_devices(dev, -1, lp3943_devs, ARRAY_SIZE(lp3943_devs),
> - NULL, 0, NULL);
> -}
> -
> -static int lp3943_remove(struct i2c_client *cl)
> -{
> - struct lp3943 *lp3943 = i2c_get_clientdata(cl);
> -
> - mfd_remove_devices(lp3943->dev);
> - return 0;
> + return devm_mfd_add_devices(dev, -1, lp3943_devs,
> + ARRAY_SIZE(lp3943_devs),
> + NULL, 0, NULL);
> }
>
> static const struct i2c_device_id lp3943_ids[] = {
> @@ -151,7 +144,6 @@ MODULE_DEVICE_TABLE(of, lp3943_of_match);
>
> static struct i2c_driver lp3943_driver = {
> .probe = lp3943_probe,
> - .remove = lp3943_remove,
> .driver = {
> .name = "lp3943",
> .of_match_table = of_match_ptr(lp3943_of_match),
>
next prev parent reply other threads:[~2016-04-05 23:59 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-05 11:48 [PATCH 00/20] mfd: Add devm_ apis for mfd_add_devices and mfd_release_devices Laxman Dewangan
2016-04-05 11:48 ` Laxman Dewangan
2016-04-05 11:48 ` [PATCH 01/20] " Laxman Dewangan
2016-04-05 11:48 ` Laxman Dewangan
2016-04-07 10:44 ` Lee Jones
2016-04-07 10:44 ` Laxman Dewangan
2016-04-07 10:44 ` Laxman Dewangan
2016-04-07 11:42 ` Lee Jones
2016-04-07 11:42 ` Laxman Dewangan
2016-04-07 11:42 ` Laxman Dewangan
2016-04-05 11:48 ` [PATCH 02/20] mfd: Add resource management devm_mfd_{add,remove}_devices Laxman Dewangan
2016-04-05 11:48 ` Laxman Dewangan
2016-04-05 11:48 ` [PATCH 03/20] mfd: act8945a: Use devm_mfd_add_devices() for mfd_device registration Laxman Dewangan
2016-04-05 11:48 ` Laxman Dewangan
2016-04-05 11:48 ` [PATCH 04/20] mfd: as3711: " Laxman Dewangan
2016-04-05 11:48 ` Laxman Dewangan
2016-04-05 11:48 ` [PATCH 05/20] mfd: atmel-hlcdc: " Laxman Dewangan
2016-04-05 11:48 ` Laxman Dewangan
2016-04-05 17:09 ` Boris Brezillon
2016-04-05 17:09 ` Boris Brezillon
2016-04-05 11:48 ` [PATCH 06/20] mfd: bcm590xx: " Laxman Dewangan
2016-04-05 11:48 ` Laxman Dewangan
2016-04-05 11:48 ` [PATCH 07/20] mfd: hi6421-pmic: " Laxman Dewangan
2016-04-05 11:48 ` Laxman Dewangan
2016-04-05 11:48 ` [PATCH 08/20] mfd: lp3943: " Laxman Dewangan
2016-04-05 11:48 ` Laxman Dewangan
2016-04-05 23:59 ` Kim, Milo [this message]
2016-04-05 23:59 ` Kim, Milo
2016-04-05 11:48 ` [PATCH 09/20] mfd: menf21bmc: " Laxman Dewangan
2016-04-05 11:48 ` Laxman Dewangan
2016-04-05 13:00 ` Andreas Werner
2016-04-05 13:00 ` Andreas Werner
2016-04-05 11:48 ` [PATCH 10/20] mfd: mt6397: " Laxman Dewangan
2016-04-05 11:48 ` Laxman Dewangan
2016-04-05 12:53 ` Javier Martinez Canillas
2016-04-05 11:48 ` [PATCH 11/20] mfd: rdc321x: " Laxman Dewangan
2016-04-05 11:48 ` Laxman Dewangan
2016-04-05 11:48 ` [PATCH 12/20] mfd: rk808: " Laxman Dewangan
2016-04-05 11:48 ` Laxman Dewangan
2016-04-05 11:48 ` [PATCH 13/20] mfd: rn5t618: " Laxman Dewangan
2016-04-05 11:48 ` Laxman Dewangan
2016-04-05 11:48 ` [PATCH 14/20] mfd: rt5033: " Laxman Dewangan
2016-04-05 11:48 ` Laxman Dewangan
2016-04-05 12:54 ` Javier Martinez Canillas
2016-04-05 11:48 ` [PATCH 15/20] mfd: sky81452: " Laxman Dewangan
2016-04-05 11:48 ` Laxman Dewangan
2016-04-05 11:48 ` [PATCH 16/20] mfd: stw481x: " Laxman Dewangan
2016-04-05 11:48 ` Laxman Dewangan
2016-04-05 13:18 ` Linus Walleij
2016-04-05 11:48 ` [PATCH 17/20] mfd: tps6507x: " Laxman Dewangan
2016-04-05 11:48 ` Laxman Dewangan
2016-04-05 11:48 ` [PATCH 18/20] mfd: tps65217: " Laxman Dewangan
2016-04-05 11:48 ` Laxman Dewangan
2016-04-05 11:48 ` [PATCH 19/20] mfd: tps65910: " Laxman Dewangan
2016-04-05 11:48 ` Laxman Dewangan
2016-04-05 11:48 ` [PATCH 20/20] mfd: wm8400: " Laxman Dewangan
2016-04-05 11:48 ` Laxman Dewangan
2016-04-05 13:38 ` Charles Keepax
2016-04-05 13:38 ` Charles Keepax
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=5704514E.3020603@ti.com \
--to=milo.kim@ti.com \
--cc=andreas.werner@men.de \
--cc=corbet@lwn.net \
--cc=ldewangan@nvidia.com \
--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 \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.