Merge tag 'musb-for-v3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi...
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Nov 2012 01:12:27 +0000 (17:12 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Nov 2012 01:13:16 +0000 (17:13 -0800)
USB musb merge from Felipe:

"usb: musb: patches for v3.8 merge window

We have here the usual set of cleanups for the MUSB driver; a
big set of patches converting platform_device_del() and
platform_device_put() into platform_device_unregister().

Another big set was applied converting to module_platform_driver()
macro in order to reduce some boilerplate code from all glue
layers.

Other than that, we had a series fixing one known silicon errata
where we couldn't read a few registers. In order to fix that
we're now using shadow variables for reads and only writing
to the registers which are known to break functionality when
read."

1  2 
drivers/usb/musb/am35x.c
drivers/usb/musb/musb_dsps.c

Simple merge
index ff5f112053d28f114e4d90844b7aa2172f3856d4,e770f7984b5f3dd0b2baabb649df96c7bdd229f9..cf08966af5c217efe72624d0e893e30ab50df118
@@@ -458,14 -489,24 +489,24 @@@ static int __devinit dsps_create_musb_p
        struct platform_device  *musb;
        struct resource *res;
        struct resource resources[2];
 -      char res_name[10];
 +      char res_name[11];
-       int ret, musbid;
+       int ret;
  
-       /* get memory resource */
-       snprintf(res_name, sizeof(res_name), "musb%d", id);
-       res = platform_get_resource_byname(pdev, IORESOURCE_MEM, res_name);
+       resources[0].start = dsps_control_module_phys[id];
+       resources[0].end = resources[0].start + SZ_4 - 1;
+       resources[0].flags = IORESOURCE_MEM;
+       glue->usb_ctrl[id] = devm_request_and_ioremap(&pdev->dev, resources);
+       if (glue->usb_ctrl[id] == NULL) {
+               dev_err(dev, "Failed to obtain usb_ctrl%d memory\n", id);
+               ret = -ENODEV;
+               goto err0;
+       }
+       /* first resource is for usbss, so start index from 1 */
+       res = platform_get_resource(pdev, IORESOURCE_MEM, id + 1);
        if (!res) {
-               dev_err(dev, "%s get mem resource failed\n", res_name);
+               dev_err(dev, "failed to get memory for instance %d\n", id);
                ret = -ENODEV;
                goto err0;
        }