usb: r8a66597-hcd: use platform_{get,set}_drvdata()
PATCH 2/4 usb: r8a66597-hcd: use platform_{get,set}_drvdata()
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device.
--- drivers/usb/host/r8a66597-hcd.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/usb/host/r8a66597-hcd.c +2 -2
@@ -2393,7 +2393,7 @@ static const struct dev_pm_ops r8a66597_dev_pm_ops = {static int r8a66597_remove (struct platform_device *pdev) { -struct r8a66597 *r8a66597 =dev_get_drvdata (&pdev->dev); +struct r8a66597 *r8a66597 =platform_get_drvdata (pdev);struct usb_hcd *hcd =r8a66597_to_hcd (r8a66597);del_timer_sync (&r8a66597->rh_timer);
@@ -2466,7 +2466,7 @@ static int r8a66597_probe(struct platform_device *pdev) } r8a66597 =hcd_to_r8a66597 (hcd);memset (r8a66597,0 ,sizeof (struct r8a66597 )); -dev_set_drvdata (&pdev->dev, r8a66597); +platform_set_drvdata (pdev, r8a66597); r8a66597->pdata = pdev->dev.platform_data; r8a66597->irq_sense_low = irq_trigger ==IRQF_TRIGGER_LOW ;
Signature · 1 line
1.7.1
Greg KH
maintainerQuoted 9 lines · Libo Chen
Use the wrapper functions for getting and setting the driver data using
platform_deviceinstead of using dev_{get,set}_drvdata() with&pdev->dev, so we can directly pass a structplatform_device.Signed-off-by Libo Chen <[email protected]>--- drivers/usb/host/r8a66597-hcd.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
This patch doesn't apply to my tree :(
Quoted 6 lines · Greg KH
Quoted 5 lines · Libo Chen
Use the wrapper functions for getting and setting the driver data using
platform_deviceinstead of using dev_{get,set}_drvdata() with&pdev->dev, so we can directly pass a structplatform_device.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Libo Chen <[email protected]>--- drivers/usb/host/r8a66597-hcd.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)This patch doesn't apply to my tree :(
ok, I will rebase on usb-tree later.
Thanks,
Libo
Quoted 3 lines
Quoted 6 lines · Greg KH
Quoted 5 lines · Libo Chen
Use the wrapper functions for getting and setting the driver data using
platform_deviceinstead of using dev_{get,set}_drvdata() with&pdev->dev, so we can directly pass a structplatform_device.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Libo Chen <[email protected]>--- drivers/usb/host/r8a66597-hcd.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)This patch doesn't apply to my tree :(
Hi Greg,
This patch based on mainline.
Do you mean this patch got a conflicted in "git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git"
I need to rebase on "usb.git"?
Quoted 3 lines
Greg KH
maintainerQuoted 12 lines · Libo Chen
Quoted 11 lines · Greg KH
Quoted 9 lines · Libo Chen
Use the wrapper functions for getting and setting the driver data using
platform_deviceinstead of using dev_{get,set}_drvdata() with&pdev->dev, so we can directly pass a structplatform_device.Signed-off-by Libo Chen <[email protected]>--- drivers/usb/host/r8a66597-hcd.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
Quoted 8 lines
Quoted 1 line
This patch doesn't apply to my tree :(
Hi Greg,
This patch based on mainline.
Do you mean this patch got a conflicted in "git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git"I need to rebase on "usb.git"?
Yes, please use the usb-next branch.
thanks,
greg k-h
PATCH RESEND 2/4 usb: r8a66597-hcd: use platform_{get,set}_drvdata()
In reply to Greg KHUse the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &of->dev, so we can directly pass a struct platform_device.
--- drivers/usb/host/r8a66597-hcd.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
rebase on usb-next tree
drivers/usb/host/r8a66597-hcd.c +2 -2
@@ -2393,7 +2393,7 @@ static const struct dev_pm_ops r8a66597_dev_pm_ops = {static int r8a66597_remove (struct platform_device *pdev) { -struct r8a66597 *r8a66597 =dev_get_drvdata (&pdev->dev); +struct r8a66597 *r8a66597 =platform_get_drvdata (pdev);struct usb_hcd *hcd =r8a66597_to_hcd (r8a66597);del_timer_sync (&r8a66597->rh_timer);
@@ -2466,7 +2466,7 @@ static int r8a66597_probe(struct platform_device *pdev) } r8a66597 =hcd_to_r8a66597 (hcd);memset (r8a66597,0 ,sizeof (struct r8a66597 )); -dev_set_drvdata (&pdev->dev, r8a66597); +platform_set_drvdata (pdev, r8a66597); r8a66597->pdata =dev_get_platdata (&pdev->dev); r8a66597->irq_sense_low = irq_trigger ==IRQF_TRIGGER_LOW ;
Signature · 1 line
1.7.1