summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ohci-at91.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-07-30 19:59:40 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-31 17:53:50 -0700
commitd4f09e28d7bc5c1adde8229b1e89401f23fb44f9 (patch)
tree839932c47eb570a24b6758a4829b81839310395b /drivers/usb/host/ohci-at91.c
parent4fae6f0fa86f92e6bc7429371b1e177ad0aaac66 (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.c12
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,
static int
ohci_at91_reset (struct usb_hcd *hcd)
{
- struct at91_usbh_data *board = hcd->self.controller->platform_data;
+ struct at91_usbh_data *board = dev_get_platdata(hcd->self.controller);
struct ohci_hcd *ohci = hcd_to_ohci (hcd);
int ret;
@@ -280,7 +280,7 @@ static int ohci_at91_usb_get_power(struct at91_usbh_data *pdata, int port)
*/
static int ohci_at91_hub_status_data(struct usb_hcd *hcd, char *buf)
{
- struct at91_usbh_data *pdata = hcd->self.controller->platform_data;
+ struct at91_usbh_data *pdata = dev_get_platdata(hcd->self.controller);
int length = ohci_hub_status_data(hcd, buf);
int port;
@@ -301,7 +301,7 @@ static int ohci_at91_hub_status_data(struct usb_hcd *hcd, char *buf)
static int ohci_at91_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
u16 wIndex, char *buf, u16 wLength)
{
- struct at91_usbh_data *pdata = hcd->self.controller->platform_data;
+ struct at91_usbh_data *pdata = dev_get_platdata(hcd->self.controller);
struct usb_hub_descriptor *desc;
int ret = -EINVAL;
u32 *data = (u32 *)buf;
@@ -461,7 +461,7 @@ static const struct hc_driver ohci_at91_hc_driver = {
static irqreturn_t ohci_hcd_at91_overcurrent_irq(int irq, void *data)
{
struct platform_device *pdev = data;
- struct at91_usbh_data *pdata = pdev->dev.platform_data;
+ struct at91_usbh_data *pdata = dev_get_platdata(&pdev->dev);
int val, gpio, port;
/* From the GPIO notifying the over-current situation, find
@@ -567,7 +567,7 @@ static int ohci_hcd_at91_drv_probe(struct platform_device *pdev)
if (ret)
return ret;
- pdata = pdev->dev.platform_data;
+ pdata = dev_get_platdata(&pdev->dev);
if (pdata) {
at91_for_each_port(i) {
@@ -643,7 +643,7 @@ static int ohci_hcd_at91_drv_probe(struct platform_device *pdev)
static int ohci_hcd_at91_drv_remove(struct platform_device *pdev)
{
- struct at91_usbh_data *pdata = pdev->dev.platform_data;
+ struct at91_usbh_data *pdata = dev_get_platdata(&pdev->dev);
int i;
if (pdata) {