diff options
Diffstat (limited to 'drivers/usb/musb/musb_core.c')
-rw-r--r-- | drivers/usb/musb/musb_core.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 07cf394e491..54a8bd1047d 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -128,12 +128,7 @@ MODULE_ALIAS("platform:" MUSB_DRIVER_NAME); | |||
128 | 128 | ||
129 | static inline struct musb *dev_to_musb(struct device *dev) | 129 | static inline struct musb *dev_to_musb(struct device *dev) |
130 | { | 130 | { |
131 | #ifdef CONFIG_USB_MUSB_HDRC_HCD | ||
132 | /* usbcore insists dev->driver_data is a "struct hcd *" */ | ||
133 | return hcd_to_musb(dev_get_drvdata(dev)); | ||
134 | #else | ||
135 | return dev_get_drvdata(dev); | 131 | return dev_get_drvdata(dev); |
136 | #endif | ||
137 | } | 132 | } |
138 | 133 | ||
139 | /*-------------------------------------------------------------------------*/ | 134 | /*-------------------------------------------------------------------------*/ |
@@ -1876,10 +1871,9 @@ allocate_instance(struct device *dev, | |||
1876 | musb = kzalloc(sizeof *musb, GFP_KERNEL); | 1871 | musb = kzalloc(sizeof *musb, GFP_KERNEL); |
1877 | if (!musb) | 1872 | if (!musb) |
1878 | return NULL; | 1873 | return NULL; |
1879 | dev_set_drvdata(dev, musb); | ||
1880 | 1874 | ||
1881 | #endif | 1875 | #endif |
1882 | 1876 | dev_set_drvdata(dev, musb); | |
1883 | musb->mregs = mbase; | 1877 | musb->mregs = mbase; |
1884 | musb->ctrl_base = mbase; | 1878 | musb->ctrl_base = mbase; |
1885 | musb->nIrq = -ENODEV; | 1879 | musb->nIrq = -ENODEV; |
@@ -2191,7 +2185,7 @@ static int __init musb_probe(struct platform_device *pdev) | |||
2191 | void __iomem *base; | 2185 | void __iomem *base; |
2192 | 2186 | ||
2193 | iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 2187 | iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
2194 | if (!iomem || irq == 0) | 2188 | if (!iomem || irq <= 0) |
2195 | return -ENODEV; | 2189 | return -ENODEV; |
2196 | 2190 | ||
2197 | base = ioremap(iomem->start, resource_size(iomem)); | 2191 | base = ioremap(iomem->start, resource_size(iomem)); |