summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/tusb6010.c
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2013-07-17 10:51:22 +0300
committerFelipe Balbi <balbi@ti.com>2013-07-17 10:51:22 +0300
commitc1f01be4060b6f1932e428c209a6c14d6b22fc1c (patch)
treef9e48d951bcb55807396414fefa65a8054279680 /drivers/usb/musb/tusb6010.c
parent690c70bab1ebab0782cf9c316b726e2dddebc411 (diff)
downloadlinux-c1f01be4060b6f1932e428c209a6c14d6b22fc1c.tar.gz
linux-c1f01be4060b6f1932e428c209a6c14d6b22fc1c.tar.bz2
linux-c1f01be4060b6f1932e428c209a6c14d6b22fc1c.zip
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/tusb6010.c')
-rw-r--r--drivers/usb/musb/tusb6010.c7
1 files changed, 6 insertions, 1 deletions
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);
static int tusb_probe(struct platform_device *pdev)
{
- struct resource musb_resources[2];
+ struct resource musb_resources[3];
struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data;
struct platform_device *musb;
struct tusb6010_glue *glue;
@@ -1199,6 +1199,11 @@ static int tusb_probe(struct platform_device *pdev)
musb_resources[1].end = pdev->resource[1].end;
musb_resources[1].flags = pdev->resource[1].flags;
+ musb_resources[2].name = pdev->resource[2].name;
+ musb_resources[2].start = pdev->resource[2].start;
+ musb_resources[2].end = pdev->resource[2].end;
+ musb_resources[2].flags = pdev->resource[2].flags;
+
ret = platform_device_add_resources(musb, musb_resources,
ARRAY_SIZE(musb_resources));
if (ret) {