Skip to contentSkip to conversation

usb: r8a66597-hcd: use platform_{get,set}_drvdata()

PATCH Superseded Libo Chen 2 participants 6 messages Aug 27, 2013 – Aug 30, 2013 USB

lore
Share & tools
lore

Libo Chen

author
#0 lore raw

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
index a6fd8f5..777790a 100644
@@ -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
maintainer
#1 lore raw
Quoted 9 lines · Libo Chen

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

This patch doesn't apply to my tree :(

author
#2 lore raw
Quoted 6 lines · Greg KH
Quoted 5 lines · Libo Chen

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.

Quoted 6 lines
Quoted 4 lines
---
 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
author
#3 lore raw
In reply to Greg KH
Quoted 6 lines · Greg KH
Quoted 5 lines · Libo Chen

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.

Quoted 6 lines
Quoted 4 lines
---
 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
maintainer
#4 lore raw
Quoted 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_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(-)
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

author
#5 lore raw

PATCH RESEND 2/4 usb: r8a66597-hcd: use platform_{get,set}_drvdata()

In reply to Greg KH

Use 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
index a9eef68..2ad004a 100644
@@ -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