2013-05-06 04:04:43

by Jingoo Han

[permalink] [raw]
Subject: [PATCH 1/8] mfd: intel_msic: remove unnecessary platform_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.

Signed-off-by: Jingoo Han <[email protected]>
---
drivers/mfd/intel_msic.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/mfd/intel_msic.c b/drivers/mfd/intel_msic.c
index 5be3b5e..977506e 100644
--- a/drivers/mfd/intel_msic.c
+++ b/drivers/mfd/intel_msic.c
@@ -443,7 +443,6 @@ static int intel_msic_remove(struct platform_device *pdev)
struct intel_msic *msic = platform_get_drvdata(pdev);

intel_msic_remove_devices(msic);
- platform_set_drvdata(pdev, NULL);

return 0;
}
--
1.7.2.5


2013-05-06 07:00:36

by Mika Westerberg

[permalink] [raw]
Subject: Re: [PATCH 1/8] mfd: intel_msic: remove unnecessary platform_set_drvdata()

On Mon, May 06, 2013 at 01:04:25PM +0900, Jingoo Han wrote:
> The driver core clears the driver data to NULL after device_release
> or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
> (device-core: Ensure drvdata = NULL when no driver is bound).
> Thus, it is not needed to manually clear the device driver data to NULL.
>
> Signed-off-by: Jingoo Han <[email protected]>

Acked-by: Mika Westerberg <[email protected]>

2013-05-06 07:11:30

by Jingoo Han

[permalink] [raw]
Subject: Re: [PATCH 1/8] mfd: intel_msic: remove unnecessary platform_set_drvdata()

On Monday, May 06, 2013 4:04 PM, Mika Westerberg wrote:
> On Mon, May 06, 2013 at 01:04:25PM +0900, Jingoo Han wrote:
> > The driver core clears the driver data to NULL after device_release
> > or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
> > (device-core: Ensure drvdata = NULL when no driver is bound).
> > Thus, it is not needed to manually clear the device driver data to NULL.
> >
> > Signed-off-by: Jingoo Han <[email protected]>
>
> Acked-by: Mika Westerberg <[email protected]>

Hi Mika Westerberg,

Thank you for your Acked-by. :)
It is very helpuful.

Best regards,
Jingoo Han

2013-05-07 08:14:31

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 1/8] mfd: intel_msic: remove unnecessary platform_set_drvdata()

On Mon, 06 May 2013, Jingoo Han wrote:

> The driver core clears the driver data to NULL after device_release
> or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
> (device-core: Ensure drvdata = NULL when no driver is bound).
> Thus, it is not needed to manually clear the device driver data to NULL.
>
> Signed-off-by: Jingoo Han <[email protected]>
> ---
> drivers/mfd/intel_msic.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mfd/intel_msic.c b/drivers/mfd/intel_msic.c
> index 5be3b5e..977506e 100644
> --- a/drivers/mfd/intel_msic.c
> +++ b/drivers/mfd/intel_msic.c
> @@ -443,7 +443,6 @@ static int intel_msic_remove(struct platform_device *pdev)
> struct intel_msic *msic = platform_get_drvdata(pdev);
>
> intel_msic_remove_devices(msic);
> - platform_set_drvdata(pdev, NULL);
>
> return 0;
> }

For the set:

Acked-by: Lee Jones <[email protected]>

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

2013-05-16 22:16:49

by Samuel Ortiz

[permalink] [raw]
Subject: Re: [PATCH 1/8] mfd: intel_msic: remove unnecessary platform_set_drvdata()

Hi Jingoo,

On Mon, May 06, 2013 at 01:04:25PM +0900, Jingoo Han wrote:
> The driver core clears the driver data to NULL after device_release
> or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
> (device-core: Ensure drvdata = NULL when no driver is bound).
> Thus, it is not needed to manually clear the device driver data to NULL.
>
> Signed-off-by: Jingoo Han <[email protected]>
> ---
> drivers/mfd/intel_msic.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
All 8 patches applied to mfd-next.

Cheers,
Samuel.

--
Intel Open Source Technology Centre
http://oss.intel.com/