]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
musb_hdrc: Search and replace pGadgetDriver with gadget_driver
authorTony Lindgren <tony@atomide.com>
Mon, 13 Aug 2007 11:32:13 +0000 (04:32 -0700)
committerTony Lindgren <tony@atomide.com>
Mon, 13 Aug 2007 11:32:13 +0000 (04:32 -0700)
Search and replace pGadgetDriver with gadget_driver

Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/usb/musb/g_ep0.c
drivers/usb/musb/musb_gadget.c
drivers/usb/musb/musb_procfs.c
drivers/usb/musb/musbdefs.h
drivers/usb/musb/tusb6010.c

index 4d2838b4c5d239d7ea9bcff4f11d15b755d02926..9147f432459c5412f7d6849205a6ca408fae0b1e 100644 (file)
@@ -583,10 +583,10 @@ __releases(musb->lock)
 __acquires(musb->lock)
 {
        int retval;
-       if (!musb->pGadgetDriver)
+       if (!musb->gadget_driver)
                return -EOPNOTSUPP;
        spin_unlock(&musb->lock);
-       retval = musb->pGadgetDriver->setup(&musb->g, pControlRequest);
+       retval = musb->gadget_driver->setup(&musb->g, pControlRequest);
        spin_lock(&musb->lock);
        return retval;
 }
index 028b5df8d2bb0f2748c4a3df88b0e9c07e4936e8..dda15f87da51dc5946e892bc8210d9e06220c3f8 100644 (file)
@@ -1476,7 +1476,7 @@ static void musb_pullup(struct musb *musb, int is_on)
        /* FIXME if on, HdrcStart; if off, HdrcStop */
 
        DBG(3, "gadget %s D+ pullup %s\n",
-               musb->pGadgetDriver->function, is_on ? "on" : "off");
+               musb->gadget_driver->function, is_on ? "on" : "off");
        musb_writeb(musb->mregs, MGC_O_HDRC_POWER, power);
 }
 
@@ -1703,13 +1703,13 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
        DBG(3, "registering driver %s\n", driver->function);
        spin_lock_irqsave(&musb->lock, flags);
 
-       if (musb->pGadgetDriver) {
+       if (musb->gadget_driver) {
                DBG(1, "%s is already bound to %s\n",
                                musb_driver_name,
-                               musb->pGadgetDriver->driver.name);
+                               musb->gadget_driver->driver.name);
                retval = -EBUSY;
        } else {
-               musb->pGadgetDriver = driver;
+               musb->gadget_driver = driver;
                musb->g.dev.driver = &driver->driver;
                driver->driver.bus = NULL;
                musb->softconnect = 1;
@@ -1723,7 +1723,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
        if (retval != 0) {
                DBG(3, "bind to driver %s failed --> %d\n",
                        driver->driver.name, retval);
-               musb->pGadgetDriver = NULL;
+               musb->gadget_driver = NULL;
                musb->g.dev.driver = NULL;
        }
 
@@ -1762,7 +1762,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
                                spin_lock_irqsave(&musb->lock, flags);
                                musb->xceiv.gadget = NULL;
                                musb->xceiv.state = OTG_STATE_UNDEFINED;
-                               musb->pGadgetDriver = NULL;
+                               musb->gadget_driver = NULL;
                                musb->g.dev.driver = NULL;
                                spin_unlock_irqrestore(&musb->lock, flags);
                        }
@@ -1841,7 +1841,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
        musb_hnp_stop(musb);
 #endif
 
-       if (musb->pGadgetDriver == driver) {
+       if (musb->gadget_driver == driver) {
                musb->xceiv.state = OTG_STATE_UNDEFINED;
                stop_activity(musb, driver);
 
@@ -1850,7 +1850,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
                driver->unbind(&musb->g);
                spin_lock_irqsave(&musb->lock, flags);
 
-               musb->pGadgetDriver = NULL;
+               musb->gadget_driver = NULL;
                musb->g.dev.driver = NULL;
 
                musb->is_active = 0;
@@ -1885,9 +1885,9 @@ void musb_g_resume(struct musb *musb)
        case OTG_STATE_B_WAIT_ACON:
        case OTG_STATE_B_PERIPHERAL:
                musb->is_active = 1;
-               if (musb->pGadgetDriver && musb->pGadgetDriver->resume) {
+               if (musb->gadget_driver && musb->gadget_driver->resume) {
                        spin_unlock(&musb->lock);
-                       musb->pGadgetDriver->resume(&musb->g);
+                       musb->gadget_driver->resume(&musb->g);
                        spin_lock(&musb->lock);
                }
                break;
@@ -1912,9 +1912,9 @@ void musb_g_suspend(struct musb *musb)
                break;
        case OTG_STATE_B_PERIPHERAL:
                musb->is_suspended = 1;
-               if (musb->pGadgetDriver && musb->pGadgetDriver->suspend) {
+               if (musb->gadget_driver && musb->gadget_driver->suspend) {
                        spin_unlock(&musb->lock);
-                       musb->pGadgetDriver->suspend(&musb->g);
+                       musb->gadget_driver->suspend(&musb->g);
                        spin_lock(&musb->lock);
                }
                break;
@@ -1948,9 +1948,9 @@ void musb_g_disconnect(struct musb *musb)
        (void) musb_gadget_vbus_draw(&musb->g, 0);
 
        musb->g.speed = USB_SPEED_UNKNOWN;
-       if (musb->pGadgetDriver && musb->pGadgetDriver->disconnect) {
+       if (musb->gadget_driver && musb->gadget_driver->disconnect) {
                spin_unlock(&musb->lock);
-               musb->pGadgetDriver->disconnect(&musb->g);
+               musb->gadget_driver->disconnect(&musb->g);
                spin_lock(&musb->lock);
        }
 
@@ -1987,8 +1987,8 @@ __acquires(musb->lock)
                        (devctl & MGC_M_DEVCTL_BDEVICE)
                                ? "B-Device" : "A-Device",
                        musb_readb(mbase, MGC_O_HDRC_FADDR),
-                       musb->pGadgetDriver
-                               ? musb->pGadgetDriver->driver.name
+                       musb->gadget_driver
+                               ? musb->gadget_driver->driver.name
                                : NULL
                        );
 
index 694719494bd98ac81df8b6b3811852f667a62515..f2fdce0160cec66ee51598117b841b9c3ecf6599 100644 (file)
@@ -619,8 +619,8 @@ static int dump_header_stats(struct musb *musb, char *buffer)
 #ifdef CONFIG_USB_GADGET_MUSB_HDRC
        if (is_peripheral_enabled(musb)) {
                code = sprintf(buffer, "Gadget driver: %s\n",
-                               musb->pGadgetDriver
-                                       ? musb->pGadgetDriver->driver.name
+                               musb->gadget_driver
+                                       ? musb->gadget_driver->driver.name
                                        : "(none)");
                if (code <= 0)
                        goto done;
index 7d044992065c012957904b9f9d228413729b2bbb..a8f11c4f59fcdf1a6dde2e32ca87237d0b36e8fd 100644 (file)
@@ -446,7 +446,7 @@ struct musb {
        u8                      test_mode_nr;
        u16                     ackpend;                /* ep0 */
        struct usb_gadget       g;                      /* the gadget */
-       struct usb_gadget_driver *pGadgetDriver;        /* its driver */
+       struct usb_gadget_driver *gadget_driver;        /* its driver */
 #endif
 
 #ifdef CONFIG_USB_MUSB_OTG
index da37d9b0424197263de2012e4300f38322e0ab4e..e91b51559a86eaeffa6291e05fbd43fe42484ad9 100644 (file)
@@ -422,7 +422,7 @@ static void musb_do_idle(unsigned long _musb)
 #endif
 
 #ifdef CONFIG_USB_GADGET_MUSB_HDRC
-               if (is_peripheral_enabled(musb) && !musb->pGadgetDriver)
+               if (is_peripheral_enabled(musb) && !musb->gadget_driver)
                        wakeups = 0;
                else {
                        wakeups = TUSB_PRCM_WHOSTDISCON