aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea
diff options
context:
space:
mode:
authorMichael Grzeschik <m.grzeschik@pengutronix.de>2013-06-13 10:59:58 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-17 16:47:24 -0400
commitf6a3b3a37c4772b6f0aef8e27c82e7f4287f05e3 (patch)
treedb131fa5a4db77b69737a48a86aa556061b484b2 /drivers/usb/chipidea
parent691962d1593a16d5c8c9a5bb60b586ac3e54acc8 (diff)
usb: chipidea: ci13xxx-imx: move static pdata into probe function
The pdata structure gets copied anyway inside ci13xxx_add_device by platform_device_add. We don't need to have it static. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea')
-rw-r--r--drivers/usb/chipidea/ci13xxx_imx.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/usb/chipidea/ci13xxx_imx.c b/drivers/usb/chipidea/ci13xxx_imx.c
index 9cecfd517b78..18d83abac7cd 100644
--- a/drivers/usb/chipidea/ci13xxx_imx.c
+++ b/drivers/usb/chipidea/ci13xxx_imx.c
@@ -87,17 +87,16 @@ EXPORT_SYMBOL_GPL(usbmisc_get_init_data);
87 87
88/* End of common functions shared by usbmisc drivers*/ 88/* End of common functions shared by usbmisc drivers*/
89 89
90static struct ci13xxx_platform_data ci13xxx_imx_platdata = {
91 .name = "ci13xxx_imx",
92 .flags = CI13XXX_REQUIRE_TRANSCEIVER |
93 CI13XXX_PULLUP_ON_VBUS |
94 CI13XXX_DISABLE_STREAMING,
95 .capoffset = DEF_CAPOFFSET,
96};
97
98static int ci13xxx_imx_probe(struct platform_device *pdev) 90static int ci13xxx_imx_probe(struct platform_device *pdev)
99{ 91{
100 struct ci13xxx_imx_data *data; 92 struct ci13xxx_imx_data *data;
93 struct ci13xxx_platform_data pdata = {
94 .name = "ci13xxx_imx",
95 .capoffset = DEF_CAPOFFSET,
96 .flags = CI13XXX_REQUIRE_TRANSCEIVER |
97 CI13XXX_PULLUP_ON_VBUS |
98 CI13XXX_DISABLE_STREAMING,
99 };
101 struct platform_device *phy_pdev; 100 struct platform_device *phy_pdev;
102 struct resource *res; 101 struct resource *res;
103 int ret; 102 int ret;
@@ -160,7 +159,7 @@ static int ci13xxx_imx_probe(struct platform_device *pdev)
160 data->reg_vbus = NULL; 159 data->reg_vbus = NULL;
161 } 160 }
162 161
163 ci13xxx_imx_platdata.phy = data->phy; 162 pdata.phy = data->phy;
164 163
165 if (!pdev->dev.dma_mask) 164 if (!pdev->dev.dma_mask)
166 pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask; 165 pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
@@ -178,7 +177,7 @@ static int ci13xxx_imx_probe(struct platform_device *pdev)
178 177
179 data->ci_pdev = ci13xxx_add_device(&pdev->dev, 178 data->ci_pdev = ci13xxx_add_device(&pdev->dev,
180 pdev->resource, pdev->num_resources, 179 pdev->resource, pdev->num_resources,
181 &ci13xxx_imx_platdata); 180 &pdata);
182 if (IS_ERR(data->ci_pdev)) { 181 if (IS_ERR(data->ci_pdev)) {
183 ret = PTR_ERR(data->ci_pdev); 182 ret = PTR_ERR(data->ci_pdev);
184 dev_err(&pdev->dev, 183 dev_err(&pdev->dev,