Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753784AbcD1JLT (ORCPT ); Thu, 28 Apr 2016 05:11:19 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:35813 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753555AbcD1JLQ (ORCPT ); Thu, 28 Apr 2016 05:11:16 -0400 Date: Thu, 28 Apr 2016 10:11:17 +0100 From: Lee Jones To: Laxman Dewangan Cc: milo.kim@ti.com, cw00.choi@samsung.com, k.kozlowski@samsung.com, sbkim73@samsung.com, tony@atomide.com, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org Subject: Re: [PATCH 7/7] mfd: wl1273-core: Use devm_mfd_add_devices() for mfd_device registration Message-ID: <20160428091117.GC19259@dell> References: <1461241558-26983-1-git-send-email-ldewangan@nvidia.com> <1461241558-26983-8-git-send-email-ldewangan@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1461241558-26983-8-git-send-email-ldewangan@nvidia.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1746 Lines: 58 On Thu, 21 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 > --- > drivers/mfd/wl1273-core.c | 14 ++------------ > 1 file changed, 2 insertions(+), 12 deletions(-) Applied, thanks. > diff --git a/drivers/mfd/wl1273-core.c b/drivers/mfd/wl1273-core.c > index f7c52d9..7080465 100644 > --- a/drivers/mfd/wl1273-core.c > +++ b/drivers/mfd/wl1273-core.c > @@ -170,15 +170,6 @@ static int wl1273_fm_set_volume(struct wl1273_core *core, unsigned int volume) > return 0; > } > > -static int wl1273_core_remove(struct i2c_client *client) > -{ > - dev_dbg(&client->dev, "%s\n", __func__); > - > - mfd_remove_devices(&client->dev); > - > - return 0; > -} > - > static int wl1273_core_probe(struct i2c_client *client, > const struct i2c_device_id *id) > { > @@ -237,8 +228,8 @@ static int wl1273_core_probe(struct i2c_client *client, > dev_dbg(&client->dev, "%s: number of children: %d.\n", > __func__, children); > > - r = mfd_add_devices(&client->dev, -1, core->cells, > - children, NULL, 0, NULL); > + r = devm_mfd_add_devices(&client->dev, -1, core->cells, > + children, NULL, 0, NULL); > if (r) > goto err; > > @@ -258,7 +249,6 @@ static struct i2c_driver wl1273_core_driver = { > }, > .probe = wl1273_core_probe, > .id_table = wl1273_driver_id_table, > - .remove = wl1273_core_remove, > }; > > static int __init wl1273_core_init(void) -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog