aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/tusb6010.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/musb/tusb6010.c')
-rw-r--r--drivers/usb/musb/tusb6010.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c
index 7369ba33c94f..2c06a8969a9f 100644
--- a/drivers/usb/musb/tusb6010.c
+++ b/drivers/usb/musb/tusb6010.c
@@ -1156,6 +1156,7 @@ static u64 tusb_dmamask = DMA_BIT_MASK(32);
1156 1156
1157static int tusb_probe(struct platform_device *pdev) 1157static int tusb_probe(struct platform_device *pdev)
1158{ 1158{
1159 struct resource musb_resources[2];
1159 struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data; 1160 struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data;
1160 struct platform_device *musb; 1161 struct platform_device *musb;
1161 struct tusb6010_glue *glue; 1162 struct tusb6010_glue *glue;
@@ -1185,8 +1186,21 @@ static int tusb_probe(struct platform_device *pdev)
1185 1186
1186 platform_set_drvdata(pdev, glue); 1187 platform_set_drvdata(pdev, glue);
1187 1188
1188 ret = platform_device_add_resources(musb, pdev->resource, 1189 memset(musb_resources, 0x00, sizeof(*musb_resources) *
1189 pdev->num_resources); 1190 ARRAY_SIZE(musb_resources));
1191
1192 musb_resources[0].name = pdev->resource[0].name;
1193 musb_resources[0].start = pdev->resource[0].start;
1194 musb_resources[0].end = pdev->resource[0].end;
1195 musb_resources[0].flags = pdev->resource[0].flags;
1196
1197 musb_resources[1].name = pdev->resource[1].name;
1198 musb_resources[1].start = pdev->resource[1].start;
1199 musb_resources[1].end = pdev->resource[1].end;
1200 musb_resources[1].flags = pdev->resource[1].flags;
1201
1202 ret = platform_device_add_resources(musb, musb_resources,
1203 ARRAY_SIZE(musb_resources));
1190 if (ret) { 1204 if (ret) {
1191 dev_err(&pdev->dev, "failed to add resources\n"); 1205 dev_err(&pdev->dev, "failed to add resources\n");
1192 goto err3; 1206 goto err3;