linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: smsc-ece1099: Remove unnecessarily remove callback
@ 2016-04-21 12:15 Laxman Dewangan
  2016-04-25 16:23 ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Laxman Dewangan @ 2016-04-21 12:15 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Laxman Dewangan, Benoit Cousson, Felipe Balbi,
	Santosh Shilimkar, Sourav Poddar

SMSC MFD driver does not add any MFD child devices via
mfd_add_devices() and hence it is not required to call
mfd_remove_devices() to remove MFD child devices.

Remove the call of the API mfd_remove_devices() which will
result as remove of .remove callback for driver.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
---
This is build and compile tested only.

 drivers/mfd/smsc-ece1099.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/mfd/smsc-ece1099.c b/drivers/mfd/smsc-ece1099.c
index a4c0df7..7f89e89 100644
--- a/drivers/mfd/smsc-ece1099.c
+++ b/drivers/mfd/smsc-ece1099.c
@@ -80,15 +80,6 @@ err:
 	return ret;
 }
 
-static int smsc_i2c_remove(struct i2c_client *i2c)
-{
-	struct smsc *smsc = i2c_get_clientdata(i2c);
-
-	mfd_remove_devices(smsc->dev);
-
-	return 0;
-}
-
 static const struct i2c_device_id smsc_i2c_id[] = {
 	{ "smscece1099", 0},
 	{},
@@ -100,7 +91,6 @@ static struct i2c_driver smsc_i2c_driver = {
 		   .name = "smsc",
 	},
 	.probe = smsc_i2c_probe,
-	.remove = smsc_i2c_remove,
 	.id_table = smsc_i2c_id,
 };
 
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mfd: smsc-ece1099: Remove unnecessarily remove callback
  2016-04-21 12:15 [PATCH] mfd: smsc-ece1099: Remove unnecessarily remove callback Laxman Dewangan
@ 2016-04-25 16:23 ` Lee Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2016-04-25 16:23 UTC (permalink / raw)
  To: Laxman Dewangan
  Cc: linux-kernel, Benoit Cousson, Felipe Balbi, Santosh Shilimkar,
	Sourav Poddar

On Thu, 21 Apr 2016, Laxman Dewangan wrote:

> SMSC MFD driver does not add any MFD child devices via
> mfd_add_devices() and hence it is not required to call
> mfd_remove_devices() to remove MFD child devices.
> 
> Remove the call of the API mfd_remove_devices() which will
> result as remove of .remove callback for driver.
> 
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
> Cc: Benoit Cousson <b-cousson@ti.com>
> Cc: Felipe Balbi <balbi@ti.com>
> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
> ---
> This is build and compile tested only.
> 
>  drivers/mfd/smsc-ece1099.c | 10 ----------
>  1 file changed, 10 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/smsc-ece1099.c b/drivers/mfd/smsc-ece1099.c
> index a4c0df7..7f89e89 100644
> --- a/drivers/mfd/smsc-ece1099.c
> +++ b/drivers/mfd/smsc-ece1099.c
> @@ -80,15 +80,6 @@ err:
>  	return ret;
>  }
>  
> -static int smsc_i2c_remove(struct i2c_client *i2c)
> -{
> -	struct smsc *smsc = i2c_get_clientdata(i2c);
> -
> -	mfd_remove_devices(smsc->dev);
> -
> -	return 0;
> -}
> -
>  static const struct i2c_device_id smsc_i2c_id[] = {
>  	{ "smscece1099", 0},
>  	{},
> @@ -100,7 +91,6 @@ static struct i2c_driver smsc_i2c_driver = {
>  		   .name = "smsc",
>  	},
>  	.probe = smsc_i2c_probe,
> -	.remove = smsc_i2c_remove,
>  	.id_table = smsc_i2c_id,
>  };
>  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-25 16:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-21 12:15 [PATCH] mfd: smsc-ece1099: Remove unnecessarily remove callback Laxman Dewangan
2016-04-25 16:23 ` Lee Jones

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).