diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-07-30 04:02:13 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-07-30 04:18:53 -0400 |
commit | 19f9e188deb4bbcd5fc588f39dc63bdfa9103827 (patch) | |
tree | 85f46dedb19e8604aa0259cce9a7471761783389 /drivers/usb/phy/phy-gpio-vbus-usb.c | |
parent | e01ee9f509a927158f670408b41127d4166db1c7 (diff) |
usb: phy: 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: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/phy/phy-gpio-vbus-usb.c')
-rw-r--r-- | drivers/usb/phy/phy-gpio-vbus-usb.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/phy/phy-gpio-vbus-usb.c b/drivers/usb/phy/phy-gpio-vbus-usb.c index 8443335c2ea0..b2f29c9aebbf 100644 --- a/drivers/usb/phy/phy-gpio-vbus-usb.c +++ b/drivers/usb/phy/phy-gpio-vbus-usb.c | |||
@@ -101,7 +101,7 @@ static void gpio_vbus_work(struct work_struct *work) | |||
101 | { | 101 | { |
102 | struct gpio_vbus_data *gpio_vbus = | 102 | struct gpio_vbus_data *gpio_vbus = |
103 | container_of(work, struct gpio_vbus_data, work.work); | 103 | container_of(work, struct gpio_vbus_data, work.work); |
104 | struct gpio_vbus_mach_info *pdata = gpio_vbus->dev->platform_data; | 104 | struct gpio_vbus_mach_info *pdata = dev_get_platdata(gpio_vbus->dev); |
105 | int gpio, status, vbus; | 105 | int gpio, status, vbus; |
106 | 106 | ||
107 | if (!gpio_vbus->phy.otg->gadget) | 107 | if (!gpio_vbus->phy.otg->gadget) |
@@ -155,7 +155,7 @@ static void gpio_vbus_work(struct work_struct *work) | |||
155 | static irqreturn_t gpio_vbus_irq(int irq, void *data) | 155 | static irqreturn_t gpio_vbus_irq(int irq, void *data) |
156 | { | 156 | { |
157 | struct platform_device *pdev = data; | 157 | struct platform_device *pdev = data; |
158 | struct gpio_vbus_mach_info *pdata = pdev->dev.platform_data; | 158 | struct gpio_vbus_mach_info *pdata = dev_get_platdata(&pdev->dev); |
159 | struct gpio_vbus_data *gpio_vbus = platform_get_drvdata(pdev); | 159 | struct gpio_vbus_data *gpio_vbus = platform_get_drvdata(pdev); |
160 | struct usb_otg *otg = gpio_vbus->phy.otg; | 160 | struct usb_otg *otg = gpio_vbus->phy.otg; |
161 | 161 | ||
@@ -182,7 +182,7 @@ static int gpio_vbus_set_peripheral(struct usb_otg *otg, | |||
182 | 182 | ||
183 | gpio_vbus = container_of(otg->phy, struct gpio_vbus_data, phy); | 183 | gpio_vbus = container_of(otg->phy, struct gpio_vbus_data, phy); |
184 | pdev = to_platform_device(gpio_vbus->dev); | 184 | pdev = to_platform_device(gpio_vbus->dev); |
185 | pdata = gpio_vbus->dev->platform_data; | 185 | pdata = dev_get_platdata(gpio_vbus->dev); |
186 | gpio = pdata->gpio_pullup; | 186 | gpio = pdata->gpio_pullup; |
187 | 187 | ||
188 | if (!gadget) { | 188 | if (!gadget) { |
@@ -243,7 +243,7 @@ static int gpio_vbus_set_suspend(struct usb_phy *phy, int suspend) | |||
243 | 243 | ||
244 | static int __init gpio_vbus_probe(struct platform_device *pdev) | 244 | static int __init gpio_vbus_probe(struct platform_device *pdev) |
245 | { | 245 | { |
246 | struct gpio_vbus_mach_info *pdata = pdev->dev.platform_data; | 246 | struct gpio_vbus_mach_info *pdata = dev_get_platdata(&pdev->dev); |
247 | struct gpio_vbus_data *gpio_vbus; | 247 | struct gpio_vbus_data *gpio_vbus; |
248 | struct resource *res; | 248 | struct resource *res; |
249 | int err, gpio, irq; | 249 | int err, gpio, irq; |
@@ -352,7 +352,7 @@ err_gpio: | |||
352 | static int __exit gpio_vbus_remove(struct platform_device *pdev) | 352 | static int __exit gpio_vbus_remove(struct platform_device *pdev) |
353 | { | 353 | { |
354 | struct gpio_vbus_data *gpio_vbus = platform_get_drvdata(pdev); | 354 | struct gpio_vbus_data *gpio_vbus = platform_get_drvdata(pdev); |
355 | struct gpio_vbus_mach_info *pdata = pdev->dev.platform_data; | 355 | struct gpio_vbus_mach_info *pdata = dev_get_platdata(&pdev->dev); |
356 | int gpio = pdata->gpio_vbus; | 356 | int gpio = pdata->gpio_vbus; |
357 | 357 | ||
358 | device_init_wakeup(&pdev->dev, 0); | 358 | device_init_wakeup(&pdev->dev, 0); |