2015-12-04 14:01:07

by Jisheng Zhang

[permalink] [raw]
Subject: [PATCH 0/2] phy: berlin-usb: clean up

trivial patches to do some clean up: remove non-necessary header files
and remove useless platform_set_drvdata() calling.

Jisheng Zhang (2):
phy: berlin-usb: remove non-necessary header files
phy: berlin-usb: don't set device's driver_data

drivers/phy/phy-berlin-usb.c | 3 ---
1 file changed, 3 deletions(-)

--
2.6.2


2015-12-04 14:01:08

by Jisheng Zhang

[permalink] [raw]
Subject: [PATCH 1/2] phy: berlin-usb: remove non-necessary header files

We don't need gpio related header files, so remove them.

Signed-off-by: Jisheng Zhang <[email protected]>
---
drivers/phy/phy-berlin-usb.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/phy/phy-berlin-usb.c b/drivers/phy/phy-berlin-usb.c
index 797ba17..7bbb473 100644
--- a/drivers/phy/phy-berlin-usb.c
+++ b/drivers/phy/phy-berlin-usb.c
@@ -9,11 +9,9 @@
* warranty of any kind, whether express or implied.
*/

-#include <linux/gpio.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of_device.h>
-#include <linux/of_gpio.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
#include <linux/reset.h>
--
2.6.2

2015-12-04 14:01:11

by Jisheng Zhang

[permalink] [raw]
Subject: [PATCH 2/2] phy: berlin-usb: don't set device's driver_data

After commit 739ae3452d0e ("phy: berlin-usb: Set drvdata for phy and
use it"), we get the address of priv by phy_get_drvdata(), so there's
no need to set device's driver_data any more. This patch removes the
call of platform_set_drvdata().

Signed-off-by: Jisheng Zhang <[email protected]>
---
drivers/phy/phy-berlin-usb.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/phy/phy-berlin-usb.c b/drivers/phy/phy-berlin-usb.c
index 7bbb473..2017751 100644
--- a/drivers/phy/phy-berlin-usb.c
+++ b/drivers/phy/phy-berlin-usb.c
@@ -193,7 +193,6 @@ static int phy_berlin_usb_probe(struct platform_device *pdev)
return PTR_ERR(phy);
}

- platform_set_drvdata(pdev, priv);
phy_set_drvdata(phy, priv);

phy_provider =
--
2.6.2

2015-12-04 21:08:47

by Antoine Tenart

[permalink] [raw]
Subject: Re: [PATCH 1/2] phy: berlin-usb: remove non-necessary header files

On Fri, Dec 04, 2015 at 09:57:00PM +0800, Jisheng Zhang wrote:
> We don't need gpio related header files, so remove them.
>
> Signed-off-by: Jisheng Zhang <[email protected]>

Acked-by: Antoine Tenart <[email protected]>

> ---
> drivers/phy/phy-berlin-usb.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/phy/phy-berlin-usb.c b/drivers/phy/phy-berlin-usb.c
> index 797ba17..7bbb473 100644
> --- a/drivers/phy/phy-berlin-usb.c
> +++ b/drivers/phy/phy-berlin-usb.c
> @@ -9,11 +9,9 @@
> * warranty of any kind, whether express or implied.
> */
>
> -#include <linux/gpio.h>
> #include <linux/io.h>
> #include <linux/module.h>
> #include <linux/of_device.h>
> -#include <linux/of_gpio.h>
> #include <linux/phy/phy.h>
> #include <linux/platform_device.h>
> #include <linux/reset.h>
> --
> 2.6.2
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

--
Antoine T?nart, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


Attachments:
(No filename) (1.12 kB)
signature.asc (819.00 B)
Digital signature
Download all attachments

2015-12-04 21:09:21

by Antoine Tenart

[permalink] [raw]
Subject: Re: [PATCH 2/2] phy: berlin-usb: don't set device's driver_data

On Fri, Dec 04, 2015 at 09:57:01PM +0800, Jisheng Zhang wrote:
> After commit 739ae3452d0e ("phy: berlin-usb: Set drvdata for phy and
> use it"), we get the address of priv by phy_get_drvdata(), so there's
> no need to set device's driver_data any more. This patch removes the
> call of platform_set_drvdata().
>
> Signed-off-by: Jisheng Zhang <[email protected]>

Acked-by: Antoine Tenart <[email protected]>

> ---
> drivers/phy/phy-berlin-usb.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/phy/phy-berlin-usb.c b/drivers/phy/phy-berlin-usb.c
> index 7bbb473..2017751 100644
> --- a/drivers/phy/phy-berlin-usb.c
> +++ b/drivers/phy/phy-berlin-usb.c
> @@ -193,7 +193,6 @@ static int phy_berlin_usb_probe(struct platform_device *pdev)
> return PTR_ERR(phy);
> }
>
> - platform_set_drvdata(pdev, priv);
> phy_set_drvdata(phy, priv);
>
> phy_provider =
> --
> 2.6.2
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

--
Antoine T?nart, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


Attachments:
(No filename) (1.19 kB)
signature.asc (819.00 B)
Digital signature
Download all attachments