diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-07-30 06:59:40 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-31 20:53:50 -0400 |
commit | d4f09e28d7bc5c1adde8229b1e89401f23fb44f9 (patch) | |
tree | 839932c47eb570a24b6758a4829b81839310395b /drivers/usb/host/ohci-at91.c | |
parent | 4fae6f0fa86f92e6bc7429371b1e177ad0aaac66 (diff) |
USB: host: use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ohci-at91.c')
-rw-r--r-- | drivers/usb/host/ohci-at91.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index 9677f6831209..a87564559e03 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c | |||
@@ -225,7 +225,7 @@ static void usb_hcd_at91_remove(struct usb_hcd *hcd, | |||
225 | static int | 225 | static int |
226 | ohci_at91_reset (struct usb_hcd *hcd) | 226 | ohci_at91_reset (struct usb_hcd *hcd) |
227 | { | 227 | { |
228 | struct at91_usbh_data *board = hcd->self.controller->platform_data; | 228 | struct at91_usbh_data *board = dev_get_platdata(hcd->self.controller); |
229 | struct ohci_hcd *ohci = hcd_to_ohci (hcd); | 229 | struct ohci_hcd *ohci = hcd_to_ohci (hcd); |
230 | int ret; | 230 | int ret; |
231 | 231 | ||
@@ -280,7 +280,7 @@ static int ohci_at91_usb_get_power(struct at91_usbh_data *pdata, int port) | |||
280 | */ | 280 | */ |
281 | static int ohci_at91_hub_status_data(struct usb_hcd *hcd, char *buf) | 281 | static int ohci_at91_hub_status_data(struct usb_hcd *hcd, char *buf) |
282 | { | 282 | { |
283 | struct at91_usbh_data *pdata = hcd->self.controller->platform_data; | 283 | struct at91_usbh_data *pdata = dev_get_platdata(hcd->self.controller); |
284 | int length = ohci_hub_status_data(hcd, buf); | 284 | int length = ohci_hub_status_data(hcd, buf); |
285 | int port; | 285 | int port; |
286 | 286 | ||
@@ -301,7 +301,7 @@ static int ohci_at91_hub_status_data(struct usb_hcd *hcd, char *buf) | |||
301 | static int ohci_at91_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, | 301 | static int ohci_at91_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, |
302 | u16 wIndex, char *buf, u16 wLength) | 302 | u16 wIndex, char *buf, u16 wLength) |
303 | { | 303 | { |
304 | struct at91_usbh_data *pdata = hcd->self.controller->platform_data; | 304 | struct at91_usbh_data *pdata = dev_get_platdata(hcd->self.controller); |
305 | struct usb_hub_descriptor *desc; | 305 | struct usb_hub_descriptor *desc; |
306 | int ret = -EINVAL; | 306 | int ret = -EINVAL; |
307 | u32 *data = (u32 *)buf; | 307 | u32 *data = (u32 *)buf; |
@@ -461,7 +461,7 @@ static const struct hc_driver ohci_at91_hc_driver = { | |||
461 | static irqreturn_t ohci_hcd_at91_overcurrent_irq(int irq, void *data) | 461 | static irqreturn_t ohci_hcd_at91_overcurrent_irq(int irq, void *data) |
462 | { | 462 | { |
463 | struct platform_device *pdev = data; | 463 | struct platform_device *pdev = data; |
464 | struct at91_usbh_data *pdata = pdev->dev.platform_data; | 464 | struct at91_usbh_data *pdata = dev_get_platdata(&pdev->dev); |
465 | int val, gpio, port; | 465 | int val, gpio, port; |
466 | 466 | ||
467 | /* From the GPIO notifying the over-current situation, find | 467 | /* From the GPIO notifying the over-current situation, find |
@@ -567,7 +567,7 @@ static int ohci_hcd_at91_drv_probe(struct platform_device *pdev) | |||
567 | if (ret) | 567 | if (ret) |
568 | return ret; | 568 | return ret; |
569 | 569 | ||
570 | pdata = pdev->dev.platform_data; | 570 | pdata = dev_get_platdata(&pdev->dev); |
571 | 571 | ||
572 | if (pdata) { | 572 | if (pdata) { |
573 | at91_for_each_port(i) { | 573 | at91_for_each_port(i) { |
@@ -643,7 +643,7 @@ static int ohci_hcd_at91_drv_probe(struct platform_device *pdev) | |||
643 | 643 | ||
644 | static int ohci_hcd_at91_drv_remove(struct platform_device *pdev) | 644 | static int ohci_hcd_at91_drv_remove(struct platform_device *pdev) |
645 | { | 645 | { |
646 | struct at91_usbh_data *pdata = pdev->dev.platform_data; | 646 | struct at91_usbh_data *pdata = dev_get_platdata(&pdev->dev); |
647 | int i; | 647 | int i; |
648 | 648 | ||
649 | if (pdata) { | 649 | if (pdata) { |