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 | |
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>
26 files changed, 65 insertions, 64 deletions
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index bd831ec06dcd..45eee6e9c6c8 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c | |||
@@ -57,7 +57,7 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver, | |||
57 | pr_debug("initializing FSL-SOC USB Controller\n"); | 57 | pr_debug("initializing FSL-SOC USB Controller\n"); |
58 | 58 | ||
59 | /* Need platform data for setup */ | 59 | /* Need platform data for setup */ |
60 | pdata = (struct fsl_usb2_platform_data *)pdev->dev.platform_data; | 60 | pdata = (struct fsl_usb2_platform_data *)dev_get_platdata(&pdev->dev); |
61 | if (!pdata) { | 61 | if (!pdata) { |
62 | dev_err(&pdev->dev, | 62 | dev_err(&pdev->dev, |
63 | "No platform data for %s.\n", dev_name(&pdev->dev)); | 63 | "No platform data for %s.\n", dev_name(&pdev->dev)); |
@@ -190,7 +190,7 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver, | |||
190 | static void usb_hcd_fsl_remove(struct usb_hcd *hcd, | 190 | static void usb_hcd_fsl_remove(struct usb_hcd *hcd, |
191 | struct platform_device *pdev) | 191 | struct platform_device *pdev) |
192 | { | 192 | { |
193 | struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data; | 193 | struct fsl_usb2_platform_data *pdata = dev_get_platdata(&pdev->dev); |
194 | 194 | ||
195 | if (!IS_ERR_OR_NULL(hcd->phy)) { | 195 | if (!IS_ERR_OR_NULL(hcd->phy)) { |
196 | otg_set_host(hcd->phy->otg, NULL); | 196 | otg_set_host(hcd->phy->otg, NULL); |
@@ -218,7 +218,7 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd, | |||
218 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); | 218 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); |
219 | void __iomem *non_ehci = hcd->regs; | 219 | void __iomem *non_ehci = hcd->regs; |
220 | struct device *dev = hcd->self.controller; | 220 | struct device *dev = hcd->self.controller; |
221 | struct fsl_usb2_platform_data *pdata = dev->platform_data; | 221 | struct fsl_usb2_platform_data *pdata = dev_get_platdata(dev); |
222 | 222 | ||
223 | if (pdata->controller_ver < 0) { | 223 | if (pdata->controller_ver < 0) { |
224 | dev_warn(hcd->self.controller, "Could not get controller version\n"); | 224 | dev_warn(hcd->self.controller, "Could not get controller version\n"); |
@@ -291,7 +291,7 @@ static int ehci_fsl_usb_setup(struct ehci_hcd *ehci) | |||
291 | struct fsl_usb2_platform_data *pdata; | 291 | struct fsl_usb2_platform_data *pdata; |
292 | void __iomem *non_ehci = hcd->regs; | 292 | void __iomem *non_ehci = hcd->regs; |
293 | 293 | ||
294 | pdata = hcd->self.controller->platform_data; | 294 | pdata = dev_get_platdata(hcd->self.controller); |
295 | 295 | ||
296 | if (pdata->have_sysif_regs) { | 296 | if (pdata->have_sysif_regs) { |
297 | /* | 297 | /* |
@@ -363,7 +363,7 @@ static int ehci_fsl_setup(struct usb_hcd *hcd) | |||
363 | struct device *dev; | 363 | struct device *dev; |
364 | 364 | ||
365 | dev = hcd->self.controller; | 365 | dev = hcd->self.controller; |
366 | pdata = hcd->self.controller->platform_data; | 366 | pdata = dev_get_platdata(hcd->self.controller); |
367 | ehci->big_endian_desc = pdata->big_endian_desc; | 367 | ehci->big_endian_desc = pdata->big_endian_desc; |
368 | ehci->big_endian_mmio = pdata->big_endian_mmio; | 368 | ehci->big_endian_mmio = pdata->big_endian_mmio; |
369 | 369 | ||
@@ -415,7 +415,7 @@ static int ehci_fsl_mpc512x_drv_suspend(struct device *dev) | |||
415 | { | 415 | { |
416 | struct usb_hcd *hcd = dev_get_drvdata(dev); | 416 | struct usb_hcd *hcd = dev_get_drvdata(dev); |
417 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); | 417 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); |
418 | struct fsl_usb2_platform_data *pdata = dev->platform_data; | 418 | struct fsl_usb2_platform_data *pdata = dev_get_platdata(dev); |
419 | u32 tmp; | 419 | u32 tmp; |
420 | 420 | ||
421 | #ifdef DEBUG | 421 | #ifdef DEBUG |
@@ -484,7 +484,7 @@ static int ehci_fsl_mpc512x_drv_resume(struct device *dev) | |||
484 | { | 484 | { |
485 | struct usb_hcd *hcd = dev_get_drvdata(dev); | 485 | struct usb_hcd *hcd = dev_get_drvdata(dev); |
486 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); | 486 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); |
487 | struct fsl_usb2_platform_data *pdata = dev->platform_data; | 487 | struct fsl_usb2_platform_data *pdata = dev_get_platdata(dev); |
488 | u32 tmp; | 488 | u32 tmp; |
489 | 489 | ||
490 | dev_dbg(dev, "suspend=%d already_suspended=%d\n", | 490 | dev_dbg(dev, "suspend=%d already_suspended=%d\n", |
diff --git a/drivers/usb/host/ehci-mv.c b/drivers/usb/host/ehci-mv.c index 915c2db96dce..35cdbd88bbbe 100644 --- a/drivers/usb/host/ehci-mv.c +++ b/drivers/usb/host/ehci-mv.c | |||
@@ -131,7 +131,7 @@ static const struct hc_driver mv_ehci_hc_driver = { | |||
131 | 131 | ||
132 | static int mv_ehci_probe(struct platform_device *pdev) | 132 | static int mv_ehci_probe(struct platform_device *pdev) |
133 | { | 133 | { |
134 | struct mv_usb_platform_data *pdata = pdev->dev.platform_data; | 134 | struct mv_usb_platform_data *pdata = dev_get_platdata(&pdev->dev); |
135 | struct usb_hcd *hcd; | 135 | struct usb_hcd *hcd; |
136 | struct ehci_hcd *ehci; | 136 | struct ehci_hcd *ehci; |
137 | struct ehci_hcd_mv *ehci_mv; | 137 | struct ehci_hcd_mv *ehci_mv; |
diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c index 030b53958845..5899ad6626c7 100644 --- a/drivers/usb/host/ehci-mxc.c +++ b/drivers/usb/host/ehci-mxc.c | |||
@@ -49,7 +49,7 @@ static const struct ehci_driver_overrides ehci_mxc_overrides __initconst = { | |||
49 | 49 | ||
50 | static int ehci_mxc_drv_probe(struct platform_device *pdev) | 50 | static int ehci_mxc_drv_probe(struct platform_device *pdev) |
51 | { | 51 | { |
52 | struct mxc_usbh_platform_data *pdata = pdev->dev.platform_data; | 52 | struct mxc_usbh_platform_data *pdata = dev_get_platdata(&pdev->dev); |
53 | struct usb_hcd *hcd; | 53 | struct usb_hcd *hcd; |
54 | struct resource *res; | 54 | struct resource *res; |
55 | int irq, ret; | 55 | int irq, ret; |
@@ -174,7 +174,7 @@ err_alloc: | |||
174 | 174 | ||
175 | static int ehci_mxc_drv_remove(struct platform_device *pdev) | 175 | static int ehci_mxc_drv_remove(struct platform_device *pdev) |
176 | { | 176 | { |
177 | struct mxc_usbh_platform_data *pdata = pdev->dev.platform_data; | 177 | struct mxc_usbh_platform_data *pdata = dev_get_platdata(&pdev->dev); |
178 | struct usb_hcd *hcd = platform_get_drvdata(pdev); | 178 | struct usb_hcd *hcd = platform_get_drvdata(pdev); |
179 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); | 179 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); |
180 | struct ehci_mxc_priv *priv = (struct ehci_mxc_priv *) ehci->priv; | 180 | struct ehci_mxc_priv *priv = (struct ehci_mxc_priv *) ehci->priv; |
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index 4384d07115d1..78b01fa475bb 100644 --- a/drivers/usb/host/ehci-omap.c +++ b/drivers/usb/host/ehci-omap.c | |||
@@ -100,7 +100,7 @@ static const struct ehci_driver_overrides ehci_omap_overrides __initdata = { | |||
100 | static int ehci_hcd_omap_probe(struct platform_device *pdev) | 100 | static int ehci_hcd_omap_probe(struct platform_device *pdev) |
101 | { | 101 | { |
102 | struct device *dev = &pdev->dev; | 102 | struct device *dev = &pdev->dev; |
103 | struct usbhs_omap_platform_data *pdata = dev->platform_data; | 103 | struct usbhs_omap_platform_data *pdata = dev_get_platdata(dev); |
104 | struct resource *res; | 104 | struct resource *res; |
105 | struct usb_hcd *hcd; | 105 | struct usb_hcd *hcd; |
106 | void __iomem *regs; | 106 | void __iomem *regs; |
@@ -119,7 +119,7 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) | |||
119 | 119 | ||
120 | /* For DT boot, get platform data from parent. i.e. usbhshost */ | 120 | /* For DT boot, get platform data from parent. i.e. usbhshost */ |
121 | if (dev->of_node) { | 121 | if (dev->of_node) { |
122 | pdata = dev->parent->platform_data; | 122 | pdata = dev_get_platdata(dev->parent); |
123 | dev->platform_data = pdata; | 123 | dev->platform_data = pdata; |
124 | } | 124 | } |
125 | 125 | ||
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c index 1a450aa13ebf..d1dfb9db5b42 100644 --- a/drivers/usb/host/ehci-orion.c +++ b/drivers/usb/host/ehci-orion.c | |||
@@ -139,7 +139,7 @@ ehci_orion_conf_mbus_windows(struct usb_hcd *hcd, | |||
139 | 139 | ||
140 | static int ehci_orion_drv_probe(struct platform_device *pdev) | 140 | static int ehci_orion_drv_probe(struct platform_device *pdev) |
141 | { | 141 | { |
142 | struct orion_ehci_data *pd = pdev->dev.platform_data; | 142 | struct orion_ehci_data *pd = dev_get_platdata(&pdev->dev); |
143 | const struct mbus_dram_target_info *dram; | 143 | const struct mbus_dram_target_info *dram; |
144 | struct resource *res; | 144 | struct resource *res; |
145 | struct usb_hcd *hcd; | 145 | struct usb_hcd *hcd; |
diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c index 5196d728517d..f6b790ca8cf2 100644 --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c | |||
@@ -39,7 +39,7 @@ static const char hcd_name[] = "ehci-platform"; | |||
39 | static int ehci_platform_reset(struct usb_hcd *hcd) | 39 | static int ehci_platform_reset(struct usb_hcd *hcd) |
40 | { | 40 | { |
41 | struct platform_device *pdev = to_platform_device(hcd->self.controller); | 41 | struct platform_device *pdev = to_platform_device(hcd->self.controller); |
42 | struct usb_ehci_pdata *pdata = pdev->dev.platform_data; | 42 | struct usb_ehci_pdata *pdata = dev_get_platdata(&pdev->dev); |
43 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); | 43 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); |
44 | int retval; | 44 | int retval; |
45 | 45 | ||
@@ -87,14 +87,14 @@ static int ehci_platform_probe(struct platform_device *dev) | |||
87 | * use reasonable defaults so platforms don't have to provide these. | 87 | * use reasonable defaults so platforms don't have to provide these. |
88 | * with DT probing on ARM, none of these are set. | 88 | * with DT probing on ARM, none of these are set. |
89 | */ | 89 | */ |
90 | if (!dev->dev.platform_data) | 90 | if (!dev_get_platdata(&dev->dev)) |
91 | dev->dev.platform_data = &ehci_platform_defaults; | 91 | dev->dev.platform_data = &ehci_platform_defaults; |
92 | if (!dev->dev.dma_mask) | 92 | if (!dev->dev.dma_mask) |
93 | dev->dev.dma_mask = &dev->dev.coherent_dma_mask; | 93 | dev->dev.dma_mask = &dev->dev.coherent_dma_mask; |
94 | if (!dev->dev.coherent_dma_mask) | 94 | if (!dev->dev.coherent_dma_mask) |
95 | dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); | 95 | dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); |
96 | 96 | ||
97 | pdata = dev->dev.platform_data; | 97 | pdata = dev_get_platdata(&dev->dev); |
98 | 98 | ||
99 | irq = platform_get_irq(dev, 0); | 99 | irq = platform_get_irq(dev, 0); |
100 | if (irq < 0) { | 100 | if (irq < 0) { |
@@ -148,7 +148,7 @@ err_power: | |||
148 | static int ehci_platform_remove(struct platform_device *dev) | 148 | static int ehci_platform_remove(struct platform_device *dev) |
149 | { | 149 | { |
150 | struct usb_hcd *hcd = platform_get_drvdata(dev); | 150 | struct usb_hcd *hcd = platform_get_drvdata(dev); |
151 | struct usb_ehci_pdata *pdata = dev->dev.platform_data; | 151 | struct usb_ehci_pdata *pdata = dev_get_platdata(&dev->dev); |
152 | 152 | ||
153 | usb_remove_hcd(hcd); | 153 | usb_remove_hcd(hcd); |
154 | usb_put_hcd(hcd); | 154 | usb_put_hcd(hcd); |
@@ -167,7 +167,7 @@ static int ehci_platform_remove(struct platform_device *dev) | |||
167 | static int ehci_platform_suspend(struct device *dev) | 167 | static int ehci_platform_suspend(struct device *dev) |
168 | { | 168 | { |
169 | struct usb_hcd *hcd = dev_get_drvdata(dev); | 169 | struct usb_hcd *hcd = dev_get_drvdata(dev); |
170 | struct usb_ehci_pdata *pdata = dev->platform_data; | 170 | struct usb_ehci_pdata *pdata = dev_get_platdata(dev); |
171 | struct platform_device *pdev = | 171 | struct platform_device *pdev = |
172 | container_of(dev, struct platform_device, dev); | 172 | container_of(dev, struct platform_device, dev); |
173 | bool do_wakeup = device_may_wakeup(dev); | 173 | bool do_wakeup = device_may_wakeup(dev); |
@@ -184,7 +184,7 @@ static int ehci_platform_suspend(struct device *dev) | |||
184 | static int ehci_platform_resume(struct device *dev) | 184 | static int ehci_platform_resume(struct device *dev) |
185 | { | 185 | { |
186 | struct usb_hcd *hcd = dev_get_drvdata(dev); | 186 | struct usb_hcd *hcd = dev_get_drvdata(dev); |
187 | struct usb_ehci_pdata *pdata = dev->platform_data; | 187 | struct usb_ehci_pdata *pdata = dev_get_platdata(dev); |
188 | struct platform_device *pdev = | 188 | struct platform_device *pdev = |
189 | container_of(dev, struct platform_device, dev); | 189 | container_of(dev, struct platform_device, dev); |
190 | 190 | ||
diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c index aba645bd4866..7c3de95c7054 100644 --- a/drivers/usb/host/ehci-s5p.c +++ b/drivers/usb/host/ehci-s5p.c | |||
@@ -75,7 +75,7 @@ static void s5p_setup_vbus_gpio(struct platform_device *pdev) | |||
75 | 75 | ||
76 | static int s5p_ehci_probe(struct platform_device *pdev) | 76 | static int s5p_ehci_probe(struct platform_device *pdev) |
77 | { | 77 | { |
78 | struct s5p_ehci_platdata *pdata = pdev->dev.platform_data; | 78 | struct s5p_ehci_platdata *pdata = dev_get_platdata(&pdev->dev); |
79 | struct s5p_ehci_hcd *s5p_ehci; | 79 | struct s5p_ehci_hcd *s5p_ehci; |
80 | struct usb_hcd *hcd; | 80 | struct usb_hcd *hcd; |
81 | struct ehci_hcd *ehci; | 81 | struct ehci_hcd *ehci; |
diff --git a/drivers/usb/host/ehci-sh.c b/drivers/usb/host/ehci-sh.c index c4c0ee92a397..93e59a13bc1f 100644 --- a/drivers/usb/host/ehci-sh.c +++ b/drivers/usb/host/ehci-sh.c | |||
@@ -104,7 +104,7 @@ static int ehci_hcd_sh_probe(struct platform_device *pdev) | |||
104 | goto fail_create_hcd; | 104 | goto fail_create_hcd; |
105 | } | 105 | } |
106 | 106 | ||
107 | pdata = pdev->dev.platform_data; | 107 | pdata = dev_get_platdata(&pdev->dev); |
108 | 108 | ||
109 | /* initialize hcd */ | 109 | /* initialize hcd */ |
110 | hcd = usb_create_hcd(&ehci_sh_hc_driver, &pdev->dev, | 110 | hcd = usb_create_hcd(&ehci_sh_hc_driver, &pdev->dev, |
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index 6ee7ef79b4f8..5cd33cf783da 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c | |||
@@ -361,7 +361,7 @@ static int tegra_ehci_probe(struct platform_device *pdev) | |||
361 | struct device_node *np_phy; | 361 | struct device_node *np_phy; |
362 | struct usb_phy *u_phy; | 362 | struct usb_phy *u_phy; |
363 | 363 | ||
364 | pdata = pdev->dev.platform_data; | 364 | pdata = dev_get_platdata(&pdev->dev); |
365 | if (!pdata) { | 365 | if (!pdata) { |
366 | dev_err(&pdev->dev, "Platform data missing\n"); | 366 | dev_err(&pdev->dev, "Platform data missing\n"); |
367 | return -EINVAL; | 367 | return -EINVAL; |
diff --git a/drivers/usb/host/ehci-tilegx.c b/drivers/usb/host/ehci-tilegx.c index d72b2929c03d..cca4be90a864 100644 --- a/drivers/usb/host/ehci-tilegx.c +++ b/drivers/usb/host/ehci-tilegx.c | |||
@@ -101,7 +101,7 @@ static int ehci_hcd_tilegx_drv_probe(struct platform_device *pdev) | |||
101 | { | 101 | { |
102 | struct usb_hcd *hcd; | 102 | struct usb_hcd *hcd; |
103 | struct ehci_hcd *ehci; | 103 | struct ehci_hcd *ehci; |
104 | struct tilegx_usb_platform_data *pdata = pdev->dev.platform_data; | 104 | struct tilegx_usb_platform_data *pdata = dev_get_platdata(&pdev->dev); |
105 | pte_t pte = { 0 }; | 105 | pte_t pte = { 0 }; |
106 | int my_cpu = smp_processor_id(); | 106 | int my_cpu = smp_processor_id(); |
107 | int ret; | 107 | int ret; |
@@ -186,7 +186,7 @@ err_hcd: | |||
186 | static int ehci_hcd_tilegx_drv_remove(struct platform_device *pdev) | 186 | static int ehci_hcd_tilegx_drv_remove(struct platform_device *pdev) |
187 | { | 187 | { |
188 | struct usb_hcd *hcd = platform_get_drvdata(pdev); | 188 | struct usb_hcd *hcd = platform_get_drvdata(pdev); |
189 | struct tilegx_usb_platform_data *pdata = pdev->dev.platform_data; | 189 | struct tilegx_usb_platform_data *pdata = dev_get_platdata(&pdev->dev); |
190 | 190 | ||
191 | usb_remove_hcd(hcd); | 191 | usb_remove_hcd(hcd); |
192 | usb_put_hcd(hcd); | 192 | usb_put_hcd(hcd); |
diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c index 11e0b79ff9d5..cfbff7161828 100644 --- a/drivers/usb/host/fsl-mph-dr-of.c +++ b/drivers/usb/host/fsl-mph-dr-of.c | |||
@@ -258,7 +258,7 @@ static int fsl_usb2_mph_dr_of_remove(struct platform_device *ofdev) | |||
258 | 258 | ||
259 | int fsl_usb2_mpc5121_init(struct platform_device *pdev) | 259 | int fsl_usb2_mpc5121_init(struct platform_device *pdev) |
260 | { | 260 | { |
261 | struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data; | 261 | struct fsl_usb2_platform_data *pdata = dev_get_platdata(&pdev->dev); |
262 | struct clk *clk; | 262 | struct clk *clk; |
263 | char clk_name[10]; | 263 | char clk_name[10]; |
264 | int base, clk_num; | 264 | int base, clk_num; |
@@ -298,7 +298,7 @@ int fsl_usb2_mpc5121_init(struct platform_device *pdev) | |||
298 | 298 | ||
299 | static void fsl_usb2_mpc5121_exit(struct platform_device *pdev) | 299 | static void fsl_usb2_mpc5121_exit(struct platform_device *pdev) |
300 | { | 300 | { |
301 | struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data; | 301 | struct fsl_usb2_platform_data *pdata = dev_get_platdata(&pdev->dev); |
302 | 302 | ||
303 | pdata->regs = NULL; | 303 | pdata->regs = NULL; |
304 | 304 | ||
diff --git a/drivers/usb/host/imx21-hcd.c b/drivers/usb/host/imx21-hcd.c index 03dc4d9cbeca..60a5de505ca1 100644 --- a/drivers/usb/host/imx21-hcd.c +++ b/drivers/usb/host/imx21-hcd.c | |||
@@ -1860,7 +1860,7 @@ static int imx21_probe(struct platform_device *pdev) | |||
1860 | imx21 = hcd_to_imx21(hcd); | 1860 | imx21 = hcd_to_imx21(hcd); |
1861 | imx21->hcd = hcd; | 1861 | imx21->hcd = hcd; |
1862 | imx21->dev = &pdev->dev; | 1862 | imx21->dev = &pdev->dev; |
1863 | imx21->pdata = pdev->dev.platform_data; | 1863 | imx21->pdata = dev_get_platdata(&pdev->dev); |
1864 | if (!imx21->pdata) | 1864 | if (!imx21->pdata) |
1865 | imx21->pdata = &default_pdata; | 1865 | imx21->pdata = &default_pdata; |
1866 | 1866 | ||
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c index b64e661618bb..c7d0f8f231be 100644 --- a/drivers/usb/host/isp116x-hcd.c +++ b/drivers/usb/host/isp116x-hcd.c | |||
@@ -1626,7 +1626,7 @@ static int isp116x_probe(struct platform_device *pdev) | |||
1626 | isp116x->addr_reg = addr_reg; | 1626 | isp116x->addr_reg = addr_reg; |
1627 | spin_lock_init(&isp116x->lock); | 1627 | spin_lock_init(&isp116x->lock); |
1628 | INIT_LIST_HEAD(&isp116x->async); | 1628 | INIT_LIST_HEAD(&isp116x->async); |
1629 | isp116x->board = pdev->dev.platform_data; | 1629 | isp116x->board = dev_get_platdata(&pdev->dev); |
1630 | 1630 | ||
1631 | if (!isp116x->board) { | 1631 | if (!isp116x->board) { |
1632 | ERR("Platform data structure not initialized\n"); | 1632 | ERR("Platform data structure not initialized\n"); |
diff --git a/drivers/usb/host/isp1362-hcd.c b/drivers/usb/host/isp1362-hcd.c index c15463b898e2..6f29abad6815 100644 --- a/drivers/usb/host/isp1362-hcd.c +++ b/drivers/usb/host/isp1362-hcd.c | |||
@@ -2725,7 +2725,7 @@ static int isp1362_probe(struct platform_device *pdev) | |||
2725 | INIT_LIST_HEAD(&isp1362_hcd->periodic); | 2725 | INIT_LIST_HEAD(&isp1362_hcd->periodic); |
2726 | INIT_LIST_HEAD(&isp1362_hcd->isoc); | 2726 | INIT_LIST_HEAD(&isp1362_hcd->isoc); |
2727 | INIT_LIST_HEAD(&isp1362_hcd->remove_list); | 2727 | INIT_LIST_HEAD(&isp1362_hcd->remove_list); |
2728 | isp1362_hcd->board = pdev->dev.platform_data; | 2728 | isp1362_hcd->board = dev_get_platdata(&pdev->dev); |
2729 | #if USE_PLATFORM_DELAY | 2729 | #if USE_PLATFORM_DELAY |
2730 | if (!isp1362_hcd->board->delay) { | 2730 | if (!isp1362_hcd->board->delay) { |
2731 | dev_err(hcd->self.controller, "No platform delay function given\n"); | 2731 | dev_err(hcd->self.controller, "No platform delay function given\n"); |
diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c index 3df49b169b53..df931e9ba5b5 100644 --- a/drivers/usb/host/isp1760-if.c +++ b/drivers/usb/host/isp1760-if.c | |||
@@ -351,7 +351,7 @@ static int isp1760_plat_probe(struct platform_device *pdev) | |||
351 | struct resource *mem_res; | 351 | struct resource *mem_res; |
352 | struct resource *irq_res; | 352 | struct resource *irq_res; |
353 | resource_size_t mem_size; | 353 | resource_size_t mem_size; |
354 | struct isp1760_platform_data *priv = pdev->dev.platform_data; | 354 | struct isp1760_platform_data *priv = dev_get_platdata(&pdev->dev); |
355 | unsigned int devflags = 0; | 355 | unsigned int devflags = 0; |
356 | unsigned long irqflags = IRQF_SHARED; | 356 | unsigned long irqflags = IRQF_SHARED; |
357 | 357 | ||
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) { |
diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c index 6aaa9c9c8eb0..9be59f11e051 100644 --- a/drivers/usb/host/ohci-da8xx.c +++ b/drivers/usb/host/ohci-da8xx.c | |||
@@ -85,7 +85,7 @@ static void ohci_da8xx_ocic_handler(struct da8xx_ohci_root_hub *hub, | |||
85 | static int ohci_da8xx_init(struct usb_hcd *hcd) | 85 | static int ohci_da8xx_init(struct usb_hcd *hcd) |
86 | { | 86 | { |
87 | struct device *dev = hcd->self.controller; | 87 | struct device *dev = hcd->self.controller; |
88 | struct da8xx_ohci_root_hub *hub = dev->platform_data; | 88 | struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev); |
89 | struct ohci_hcd *ohci = hcd_to_ohci(hcd); | 89 | struct ohci_hcd *ohci = hcd_to_ohci(hcd); |
90 | int result; | 90 | int result; |
91 | u32 rh_a; | 91 | u32 rh_a; |
@@ -171,7 +171,7 @@ static int ohci_da8xx_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, | |||
171 | u16 wIndex, char *buf, u16 wLength) | 171 | u16 wIndex, char *buf, u16 wLength) |
172 | { | 172 | { |
173 | struct device *dev = hcd->self.controller; | 173 | struct device *dev = hcd->self.controller; |
174 | struct da8xx_ohci_root_hub *hub = dev->platform_data; | 174 | struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev); |
175 | int temp; | 175 | int temp; |
176 | 176 | ||
177 | switch (typeReq) { | 177 | switch (typeReq) { |
@@ -292,7 +292,7 @@ static const struct hc_driver ohci_da8xx_hc_driver = { | |||
292 | static int usb_hcd_da8xx_probe(const struct hc_driver *driver, | 292 | static int usb_hcd_da8xx_probe(const struct hc_driver *driver, |
293 | struct platform_device *pdev) | 293 | struct platform_device *pdev) |
294 | { | 294 | { |
295 | struct da8xx_ohci_root_hub *hub = pdev->dev.platform_data; | 295 | struct da8xx_ohci_root_hub *hub = dev_get_platdata(&pdev->dev); |
296 | struct usb_hcd *hcd; | 296 | struct usb_hcd *hcd; |
297 | struct resource *mem; | 297 | struct resource *mem; |
298 | int error, irq; | 298 | int error, irq; |
@@ -380,7 +380,7 @@ err0: | |||
380 | static inline void | 380 | static inline void |
381 | usb_hcd_da8xx_remove(struct usb_hcd *hcd, struct platform_device *pdev) | 381 | usb_hcd_da8xx_remove(struct usb_hcd *hcd, struct platform_device *pdev) |
382 | { | 382 | { |
383 | struct da8xx_ohci_root_hub *hub = pdev->dev.platform_data; | 383 | struct da8xx_ohci_root_hub *hub = dev_get_platdata(&pdev->dev); |
384 | 384 | ||
385 | hub->ocic_notify(NULL); | 385 | hub->ocic_notify(NULL); |
386 | usb_remove_hcd(hcd); | 386 | usb_remove_hcd(hcd); |
diff --git a/drivers/usb/host/ohci-exynos.c b/drivers/usb/host/ohci-exynos.c index b0b542c14e31..dc6ee9adacf5 100644 --- a/drivers/usb/host/ohci-exynos.c +++ b/drivers/usb/host/ohci-exynos.c | |||
@@ -100,7 +100,7 @@ static const struct hc_driver exynos_ohci_hc_driver = { | |||
100 | 100 | ||
101 | static int exynos_ohci_probe(struct platform_device *pdev) | 101 | static int exynos_ohci_probe(struct platform_device *pdev) |
102 | { | 102 | { |
103 | struct exynos4_ohci_platdata *pdata = pdev->dev.platform_data; | 103 | struct exynos4_ohci_platdata *pdata = dev_get_platdata(&pdev->dev); |
104 | struct exynos_ohci_hcd *exynos_ohci; | 104 | struct exynos_ohci_hcd *exynos_ohci; |
105 | struct usb_hcd *hcd; | 105 | struct usb_hcd *hcd; |
106 | struct ohci_hcd *ohci; | 106 | struct ohci_hcd *ohci; |
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c index 8747fa6a51b7..31d3a12eb486 100644 --- a/drivers/usb/host/ohci-omap.c +++ b/drivers/usb/host/ohci-omap.c | |||
@@ -191,7 +191,7 @@ static void start_hnp(struct ohci_hcd *ohci) | |||
191 | static int ohci_omap_init(struct usb_hcd *hcd) | 191 | static int ohci_omap_init(struct usb_hcd *hcd) |
192 | { | 192 | { |
193 | struct ohci_hcd *ohci = hcd_to_ohci(hcd); | 193 | struct ohci_hcd *ohci = hcd_to_ohci(hcd); |
194 | struct omap_usb_config *config = hcd->self.controller->platform_data; | 194 | struct omap_usb_config *config = dev_get_platdata(hcd->self.controller); |
195 | int need_transceiver = (config->otg != 0); | 195 | int need_transceiver = (config->otg != 0); |
196 | int ret; | 196 | int ret; |
197 | 197 | ||
@@ -427,7 +427,7 @@ ohci_omap_start (struct usb_hcd *hcd) | |||
427 | 427 | ||
428 | if (!host_enabled) | 428 | if (!host_enabled) |
429 | return 0; | 429 | return 0; |
430 | config = hcd->self.controller->platform_data; | 430 | config = dev_get_platdata(hcd->self.controller); |
431 | if (config->otg || config->rwc) { | 431 | if (config->otg || config->rwc) { |
432 | ohci->hc_control = OHCI_CTRL_RWC; | 432 | ohci->hc_control = OHCI_CTRL_RWC; |
433 | writel(OHCI_CTRL_RWC, &ohci->regs->control); | 433 | writel(OHCI_CTRL_RWC, &ohci->regs->control); |
diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c index bc30475c3a23..a4c6410f0ed4 100644 --- a/drivers/usb/host/ohci-platform.c +++ b/drivers/usb/host/ohci-platform.c | |||
@@ -33,7 +33,7 @@ static const char hcd_name[] = "ohci-platform"; | |||
33 | static int ohci_platform_reset(struct usb_hcd *hcd) | 33 | static int ohci_platform_reset(struct usb_hcd *hcd) |
34 | { | 34 | { |
35 | struct platform_device *pdev = to_platform_device(hcd->self.controller); | 35 | struct platform_device *pdev = to_platform_device(hcd->self.controller); |
36 | struct usb_ohci_pdata *pdata = pdev->dev.platform_data; | 36 | struct usb_ohci_pdata *pdata = dev_get_platdata(&pdev->dev); |
37 | struct ohci_hcd *ohci = hcd_to_ohci(hcd); | 37 | struct ohci_hcd *ohci = hcd_to_ohci(hcd); |
38 | 38 | ||
39 | if (pdata->big_endian_desc) | 39 | if (pdata->big_endian_desc) |
@@ -59,7 +59,7 @@ static int ohci_platform_probe(struct platform_device *dev) | |||
59 | { | 59 | { |
60 | struct usb_hcd *hcd; | 60 | struct usb_hcd *hcd; |
61 | struct resource *res_mem; | 61 | struct resource *res_mem; |
62 | struct usb_ohci_pdata *pdata = dev->dev.platform_data; | 62 | struct usb_ohci_pdata *pdata = dev_get_platdata(&dev->dev); |
63 | int irq; | 63 | int irq; |
64 | int err = -ENOMEM; | 64 | int err = -ENOMEM; |
65 | 65 | ||
@@ -124,7 +124,7 @@ err_power: | |||
124 | static int ohci_platform_remove(struct platform_device *dev) | 124 | static int ohci_platform_remove(struct platform_device *dev) |
125 | { | 125 | { |
126 | struct usb_hcd *hcd = platform_get_drvdata(dev); | 126 | struct usb_hcd *hcd = platform_get_drvdata(dev); |
127 | struct usb_ohci_pdata *pdata = dev->dev.platform_data; | 127 | struct usb_ohci_pdata *pdata = dev_get_platdata(&dev->dev); |
128 | 128 | ||
129 | usb_remove_hcd(hcd); | 129 | usb_remove_hcd(hcd); |
130 | usb_put_hcd(hcd); | 130 | usb_put_hcd(hcd); |
@@ -139,7 +139,7 @@ static int ohci_platform_remove(struct platform_device *dev) | |||
139 | 139 | ||
140 | static int ohci_platform_suspend(struct device *dev) | 140 | static int ohci_platform_suspend(struct device *dev) |
141 | { | 141 | { |
142 | struct usb_ohci_pdata *pdata = dev->platform_data; | 142 | struct usb_ohci_pdata *pdata = dev_get_platdata(dev); |
143 | struct platform_device *pdev = | 143 | struct platform_device *pdev = |
144 | container_of(dev, struct platform_device, dev); | 144 | container_of(dev, struct platform_device, dev); |
145 | 145 | ||
@@ -152,7 +152,7 @@ static int ohci_platform_suspend(struct device *dev) | |||
152 | static int ohci_platform_resume(struct device *dev) | 152 | static int ohci_platform_resume(struct device *dev) |
153 | { | 153 | { |
154 | struct usb_hcd *hcd = dev_get_drvdata(dev); | 154 | struct usb_hcd *hcd = dev_get_drvdata(dev); |
155 | struct usb_ohci_pdata *pdata = dev->platform_data; | 155 | struct usb_ohci_pdata *pdata = dev_get_platdata(dev); |
156 | struct platform_device *pdev = | 156 | struct platform_device *pdev = |
157 | container_of(dev, struct platform_device, dev); | 157 | container_of(dev, struct platform_device, dev); |
158 | 158 | ||
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c index 3a9c01d8b79c..93371a235e82 100644 --- a/drivers/usb/host/ohci-pxa27x.c +++ b/drivers/usb/host/ohci-pxa27x.c | |||
@@ -219,7 +219,7 @@ static int pxa27x_start_hc(struct pxa27x_ohci *ohci, struct device *dev) | |||
219 | struct pxaohci_platform_data *inf; | 219 | struct pxaohci_platform_data *inf; |
220 | uint32_t uhchr; | 220 | uint32_t uhchr; |
221 | 221 | ||
222 | inf = dev->platform_data; | 222 | inf = dev_get_platdata(dev); |
223 | 223 | ||
224 | clk_prepare_enable(ohci->clk); | 224 | clk_prepare_enable(ohci->clk); |
225 | 225 | ||
@@ -256,7 +256,7 @@ static void pxa27x_stop_hc(struct pxa27x_ohci *ohci, struct device *dev) | |||
256 | struct pxaohci_platform_data *inf; | 256 | struct pxaohci_platform_data *inf; |
257 | uint32_t uhccoms; | 257 | uint32_t uhccoms; |
258 | 258 | ||
259 | inf = dev->platform_data; | 259 | inf = dev_get_platdata(dev); |
260 | 260 | ||
261 | if (cpu_is_pxa3xx()) | 261 | if (cpu_is_pxa3xx()) |
262 | pxa3xx_u2d_stop_hc(&ohci_to_hcd(&ohci->ohci)->self); | 262 | pxa3xx_u2d_stop_hc(&ohci_to_hcd(&ohci->ohci)->self); |
@@ -364,7 +364,7 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device | |||
364 | if (retval) | 364 | if (retval) |
365 | return retval; | 365 | return retval; |
366 | 366 | ||
367 | inf = pdev->dev.platform_data; | 367 | inf = dev_get_platdata(&pdev->dev); |
368 | 368 | ||
369 | if (!inf) | 369 | if (!inf) |
370 | return -ENODEV; | 370 | return -ENODEV; |
@@ -577,7 +577,7 @@ static int ohci_hcd_pxa27x_drv_resume(struct device *dev) | |||
577 | { | 577 | { |
578 | struct usb_hcd *hcd = dev_get_drvdata(dev); | 578 | struct usb_hcd *hcd = dev_get_drvdata(dev); |
579 | struct pxa27x_ohci *ohci = to_pxa27x_ohci(hcd); | 579 | struct pxa27x_ohci *ohci = to_pxa27x_ohci(hcd); |
580 | struct pxaohci_platform_data *inf = dev->platform_data; | 580 | struct pxaohci_platform_data *inf = dev_get_platdata(dev); |
581 | int status; | 581 | int status; |
582 | 582 | ||
583 | if (time_before(jiffies, ohci->ohci.next_statechange)) | 583 | if (time_before(jiffies, ohci->ohci.next_statechange)) |
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) |
diff --git a/drivers/usb/host/ohci-tilegx.c b/drivers/usb/host/ohci-tilegx.c index 197d514fe0d1..22540ab71f55 100644 --- a/drivers/usb/host/ohci-tilegx.c +++ b/drivers/usb/host/ohci-tilegx.c | |||
@@ -95,7 +95,7 @@ static const struct hc_driver ohci_tilegx_hc_driver = { | |||
95 | static int ohci_hcd_tilegx_drv_probe(struct platform_device *pdev) | 95 | static int ohci_hcd_tilegx_drv_probe(struct platform_device *pdev) |
96 | { | 96 | { |
97 | struct usb_hcd *hcd; | 97 | struct usb_hcd *hcd; |
98 | struct tilegx_usb_platform_data *pdata = pdev->dev.platform_data; | 98 | struct tilegx_usb_platform_data *pdata = dev_get_platdata(&pdev->dev); |
99 | pte_t pte = { 0 }; | 99 | pte_t pte = { 0 }; |
100 | int my_cpu = smp_processor_id(); | 100 | int my_cpu = smp_processor_id(); |
101 | int ret; | 101 | int ret; |
@@ -175,7 +175,7 @@ err_hcd: | |||
175 | static int ohci_hcd_tilegx_drv_remove(struct platform_device *pdev) | 175 | static int ohci_hcd_tilegx_drv_remove(struct platform_device *pdev) |
176 | { | 176 | { |
177 | struct usb_hcd *hcd = platform_get_drvdata(pdev); | 177 | struct usb_hcd *hcd = platform_get_drvdata(pdev); |
178 | struct tilegx_usb_platform_data* pdata = pdev->dev.platform_data; | 178 | struct tilegx_usb_platform_data *pdata = dev_get_platdata(&pdev->dev); |
179 | 179 | ||
180 | usb_remove_hcd(hcd); | 180 | usb_remove_hcd(hcd); |
181 | usb_put_hcd(hcd); | 181 | usb_put_hcd(hcd); |
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c index a6fd8f5371df..a9eef6822a24 100644 --- a/drivers/usb/host/r8a66597-hcd.c +++ b/drivers/usb/host/r8a66597-hcd.c | |||
@@ -2467,7 +2467,7 @@ static int r8a66597_probe(struct platform_device *pdev) | |||
2467 | r8a66597 = hcd_to_r8a66597(hcd); | 2467 | r8a66597 = hcd_to_r8a66597(hcd); |
2468 | memset(r8a66597, 0, sizeof(struct r8a66597)); | 2468 | memset(r8a66597, 0, sizeof(struct r8a66597)); |
2469 | dev_set_drvdata(&pdev->dev, r8a66597); | 2469 | dev_set_drvdata(&pdev->dev, r8a66597); |
2470 | r8a66597->pdata = pdev->dev.platform_data; | 2470 | r8a66597->pdata = dev_get_platdata(&pdev->dev); |
2471 | r8a66597->irq_sense_low = irq_trigger == IRQF_TRIGGER_LOW; | 2471 | r8a66597->irq_sense_low = irq_trigger == IRQF_TRIGGER_LOW; |
2472 | 2472 | ||
2473 | if (r8a66597->pdata->on_chip) { | 2473 | if (r8a66597->pdata->on_chip) { |
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c index d8938630e092..5477bf5df218 100644 --- a/drivers/usb/host/sl811-hcd.c +++ b/drivers/usb/host/sl811-hcd.c | |||
@@ -1691,7 +1691,7 @@ sl811h_probe(struct platform_device *dev) | |||
1691 | 1691 | ||
1692 | spin_lock_init(&sl811->lock); | 1692 | spin_lock_init(&sl811->lock); |
1693 | INIT_LIST_HEAD(&sl811->async); | 1693 | INIT_LIST_HEAD(&sl811->async); |
1694 | sl811->board = dev->dev.platform_data; | 1694 | sl811->board = dev_get_platdata(&dev->dev); |
1695 | init_timer(&sl811->timer); | 1695 | init_timer(&sl811->timer); |
1696 | sl811->timer.function = sl811h_timer; | 1696 | sl811->timer.function = sl811h_timer; |
1697 | sl811->timer.data = (unsigned long) sl811; | 1697 | sl811->timer.data = (unsigned long) sl811; |
diff --git a/drivers/usb/host/u132-hcd.c b/drivers/usb/host/u132-hcd.c index 5c124bf5d018..e402beb5a069 100644 --- a/drivers/usb/host/u132-hcd.c +++ b/drivers/usb/host/u132-hcd.c | |||
@@ -1809,9 +1809,9 @@ static int u132_hcd_start(struct usb_hcd *hcd) | |||
1809 | struct platform_device *pdev = | 1809 | struct platform_device *pdev = |
1810 | to_platform_device(hcd->self.controller); | 1810 | to_platform_device(hcd->self.controller); |
1811 | u16 vendor = ((struct u132_platform_data *) | 1811 | u16 vendor = ((struct u132_platform_data *) |
1812 | (pdev->dev.platform_data))->vendor; | 1812 | dev_get_platdata(&pdev->dev))->vendor; |
1813 | u16 device = ((struct u132_platform_data *) | 1813 | u16 device = ((struct u132_platform_data *) |
1814 | (pdev->dev.platform_data))->device; | 1814 | dev_get_platdata(&pdev->dev))->device; |
1815 | mutex_lock(&u132->sw_lock); | 1815 | mutex_lock(&u132->sw_lock); |
1816 | msleep(10); | 1816 | msleep(10); |
1817 | if (vendor == PCI_VENDOR_ID_AMD && device == 0x740c) { | 1817 | if (vendor == PCI_VENDOR_ID_AMD && device == 0x740c) { |
@@ -3034,7 +3034,7 @@ static void u132_initialise(struct u132 *u132, struct platform_device *pdev) | |||
3034 | int addrs = MAX_U132_ADDRS; | 3034 | int addrs = MAX_U132_ADDRS; |
3035 | int udevs = MAX_U132_UDEVS; | 3035 | int udevs = MAX_U132_UDEVS; |
3036 | int endps = MAX_U132_ENDPS; | 3036 | int endps = MAX_U132_ENDPS; |
3037 | u132->board = pdev->dev.platform_data; | 3037 | u132->board = dev_get_platdata(&pdev->dev); |
3038 | u132->platform_dev = pdev; | 3038 | u132->platform_dev = pdev; |
3039 | u132->power = 0; | 3039 | u132->power = 0; |
3040 | u132->reset = 0; | 3040 | u132->reset = 0; |