2017-11-07 18:14:04

by Kuninori Morimoto

[permalink] [raw]
Subject: [PATCH] renesas_usbhs: use renesas_usbhs_get_info()


From: Kuninori Morimoto <[email protected]>

We already have renesas_usbhs_get_info() macro.
Let's use it.

Signed-off-by: Kuninori Morimoto <[email protected]>
---
Shimoda-san

can you please check this patch ?

drivers/usb/renesas_usbhs/common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
index 490ebc7..e1fdb95 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -534,7 +534,7 @@ static struct renesas_usbhs_platform_info *usbhs_parse_dt(struct device *dev)

static int usbhs_probe(struct platform_device *pdev)
{
- struct renesas_usbhs_platform_info *info = dev_get_platdata(&pdev->dev);
+ struct renesas_usbhs_platform_info *info = renesas_usbhs_get_info(pdev);
struct renesas_usbhs_driver_callback *dfunc;
struct usbhs_priv *priv;
struct resource *res, *irq_res;
@@ -712,7 +712,7 @@ static int usbhs_probe(struct platform_device *pdev)
static int usbhs_remove(struct platform_device *pdev)
{
struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev);
- struct renesas_usbhs_platform_info *info = dev_get_platdata(&pdev->dev);
+ struct renesas_usbhs_platform_info *info = renesas_usbhs_get_info(pdev);
struct renesas_usbhs_driver_callback *dfunc = &info->driver_callback;

dev_dbg(&pdev->dev, "usb remove\n");
--
1.9.1


From 1583410631762361015@xxx Tue Nov 07 12:34:11 +0000 2017
X-GM-THRID: 1583410631762361015
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread


2017-11-07 12:34:11

by Yoshihiro Shimoda

[permalink] [raw]
Subject: RE: [PATCH] renesas_usbhs: use renesas_usbhs_get_info()

Hi Morimoto-san,

> From: Kuninori Morimoto, Sent: Tuesday, November 7, 2017 5:26 PM
>
> From: Kuninori Morimoto <[email protected]>
>
> We already have renesas_usbhs_get_info() macro.
> Let's use it.
>
> Signed-off-by: Kuninori Morimoto <[email protected]>
> ---
> Shimoda-san
>
> can you please check this patch ?

Thank you for the patch!
If I applied this patch on the latest usb.git of Greg / usb-next branch with
the patch Greg made [1], patch command said:

patching file drivers/usb/renesas_usbhs/common.c
Hunk #1 succeeded at 525 (offset -9 lines).
Hunk #2 succeeded at 703 (offset -9 lines).

I'm not sure you should resolve it or not.
But, this patch could work without any regressions. So,

Acked-by: Yoshihiro Shimoda <[email protected]>

[1] https://www.spinics.net/lists/linux-usb/msg162421.html

Best regards,
Yoshihiro Shimoda


From 1584291137769465057@xxx Fri Nov 17 05:49:27 +0000 2017
X-GM-THRID: 1583363522954906453
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread