aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2013-07-17 03:51:22 -0400
committerFelipe Balbi <balbi@ti.com>2013-07-17 03:51:22 -0400
commitc1f01be4060b6f1932e428c209a6c14d6b22fc1c (patch)
treef9e48d951bcb55807396414fefa65a8054279680 /drivers/usb/musb
parent690c70bab1ebab0782cf9c316b726e2dddebc411 (diff)
usb: musb: fix resource passed from glue layer to musb
some MUSB incarnations, such as those governed by omap2430.c and tusb6010.c, have three resources, not two. Fix the bug created by commit 09fc7d2 (usb: musb: fix incorrect usage of resource pointer) where only two of the three resources would be passed to musb_core.c [ balbi@ti.com : add tusb6010.c to original patch ] Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r--drivers/usb/musb/omap2430.c7
-rw-r--r--drivers/usb/musb/tusb6010.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 6708a3b78ad8..f44e8b5e00c9 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -481,7 +481,7 @@ static u64 omap2430_dmamask = DMA_BIT_MASK(32);
481 481
482static int omap2430_probe(struct platform_device *pdev) 482static int omap2430_probe(struct platform_device *pdev)
483{ 483{
484 struct resource musb_resources[2]; 484 struct resource musb_resources[3];
485 struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data; 485 struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data;
486 struct omap_musb_board_data *data; 486 struct omap_musb_board_data *data;
487 struct platform_device *musb; 487 struct platform_device *musb;
@@ -581,6 +581,11 @@ static int omap2430_probe(struct platform_device *pdev)
581 musb_resources[1].end = pdev->resource[1].end; 581 musb_resources[1].end = pdev->resource[1].end;
582 musb_resources[1].flags = pdev->resource[1].flags; 582 musb_resources[1].flags = pdev->resource[1].flags;
583 583
584 musb_resources[2].name = pdev->resource[2].name;
585 musb_resources[2].start = pdev->resource[2].start;
586 musb_resources[2].end = pdev->resource[2].end;
587 musb_resources[2].flags = pdev->resource[2].flags;
588
584 ret = platform_device_add_resources(musb, musb_resources, 589 ret = platform_device_add_resources(musb, musb_resources,
585 ARRAY_SIZE(musb_resources)); 590 ARRAY_SIZE(musb_resources));
586 if (ret) { 591 if (ret) {
diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c
index 2c06a8969a9f..6f8a9ca96ae7 100644
--- a/drivers/usb/musb/tusb6010.c
+++ b/drivers/usb/musb/tusb6010.c
@@ -1156,7 +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 resource musb_resources[3];
1160 struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data; 1160 struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data;
1161 struct platform_device *musb; 1161 struct platform_device *musb;
1162 struct tusb6010_glue *glue; 1162 struct tusb6010_glue *glue;
@@ -1199,6 +1199,11 @@ static int tusb_probe(struct platform_device *pdev)
1199 musb_resources[1].end = pdev->resource[1].end; 1199 musb_resources[1].end = pdev->resource[1].end;
1200 musb_resources[1].flags = pdev->resource[1].flags; 1200 musb_resources[1].flags = pdev->resource[1].flags;
1201 1201
1202 musb_resources[2].name = pdev->resource[2].name;
1203 musb_resources[2].start = pdev->resource[2].start;
1204 musb_resources[2].end = pdev->resource[2].end;
1205 musb_resources[2].flags = pdev->resource[2].flags;
1206
1202 ret = platform_device_add_resources(musb, musb_resources, 1207 ret = platform_device_add_resources(musb, musb_resources,
1203 ARRAY_SIZE(musb_resources)); 1208 ARRAY_SIZE(musb_resources));
1204 if (ret) { 1209 if (ret) {