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-s3c2410.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-s3c2410.c')
-rw-r--r-- | drivers/usb/host/ohci-s3c2410.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c index e125770b893c..4919afa4125e 100644 --- a/drivers/usb/host/ohci-s3c2410.c +++ b/drivers/usb/host/ohci-s3c2410.c | |||
@@ -38,12 +38,12 @@ static void s3c2410_hcd_oc(struct s3c2410_hcd_info *info, int port_oc); | |||
38 | 38 | ||
39 | static struct s3c2410_hcd_info *to_s3c2410_info(struct usb_hcd *hcd) | 39 | static struct s3c2410_hcd_info *to_s3c2410_info(struct usb_hcd *hcd) |
40 | { | 40 | { |
41 | return hcd->self.controller->platform_data; | 41 | return dev_get_platdata(hcd->self.controller); |
42 | } | 42 | } |
43 | 43 | ||
44 | static void s3c2410_start_hc(struct platform_device *dev, struct usb_hcd *hcd) | 44 | static void s3c2410_start_hc(struct platform_device *dev, struct usb_hcd *hcd) |
45 | { | 45 | { |
46 | struct s3c2410_hcd_info *info = dev->dev.platform_data; | 46 | struct s3c2410_hcd_info *info = dev_get_platdata(&dev->dev); |
47 | 47 | ||
48 | dev_dbg(&dev->dev, "s3c2410_start_hc:\n"); | 48 | dev_dbg(&dev->dev, "s3c2410_start_hc:\n"); |
49 | 49 | ||
@@ -63,7 +63,7 @@ static void s3c2410_start_hc(struct platform_device *dev, struct usb_hcd *hcd) | |||
63 | 63 | ||
64 | static void s3c2410_stop_hc(struct platform_device *dev) | 64 | static void s3c2410_stop_hc(struct platform_device *dev) |
65 | { | 65 | { |
66 | struct s3c2410_hcd_info *info = dev->dev.platform_data; | 66 | struct s3c2410_hcd_info *info = dev_get_platdata(&dev->dev); |
67 | 67 | ||
68 | dev_dbg(&dev->dev, "s3c2410_stop_hc:\n"); | 68 | dev_dbg(&dev->dev, "s3c2410_stop_hc:\n"); |
69 | 69 | ||
@@ -339,10 +339,11 @@ static int usb_hcd_s3c2410_probe(const struct hc_driver *driver, | |||
339 | struct platform_device *dev) | 339 | struct platform_device *dev) |
340 | { | 340 | { |
341 | struct usb_hcd *hcd = NULL; | 341 | struct usb_hcd *hcd = NULL; |
342 | struct s3c2410_hcd_info *info = dev_get_platdata(&dev->dev); | ||
342 | int retval; | 343 | int retval; |
343 | 344 | ||
344 | s3c2410_usb_set_power(dev->dev.platform_data, 1, 1); | 345 | s3c2410_usb_set_power(info, 1, 1); |
345 | s3c2410_usb_set_power(dev->dev.platform_data, 2, 1); | 346 | s3c2410_usb_set_power(info, 2, 1); |
346 | 347 | ||
347 | hcd = usb_create_hcd(driver, &dev->dev, "s3c24xx"); | 348 | hcd = usb_create_hcd(driver, &dev->dev, "s3c24xx"); |
348 | if (hcd == NULL) | 349 | if (hcd == NULL) |