~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to drivers/usb/gadget/lh7a40x_udc.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno, Martin Michlmayr
  • Date: 2011-04-06 13:53:30 UTC
  • mfrom: (43.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110406135330-wjufxhd0tvn3zx4z
Tags: 2.6.38-3
[ Ben Hutchings ]
* [ppc64] Add to linux-tools package architectures (Closes: #620124)
* [amd64] Save cr4 to mmu_cr4_features at boot time (Closes: #620284)
* appletalk: Fix bugs introduced when removing use of BKL
* ALSA: Fix yet another race in disconnection
* cciss: Fix lost command issue
* ath9k: Fix kernel panic in AR2427
* ses: Avoid kernel panic when lun 0 is not mapped
* PCI/ACPI: Report ASPM support to BIOS if not disabled from command line

[ Aurelien Jarno ]
* rtlwifi: fix build when PCI is not enabled.

[ Martin Michlmayr ]
* rtlwifi: Eliminate udelay calls with too large values (Closes: #620204)

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 */
23
23
 
24
24
#include <linux/platform_device.h>
 
25
#include <linux/slab.h>
25
26
 
26
27
#include "lh7a40x_udc.h"
27
28
 
407
408
/*
408
409
  Register entry point for the peripheral controller driver.
409
410
*/
410
 
int usb_gadget_register_driver(struct usb_gadget_driver *driver)
 
411
int usb_gadget_probe_driver(struct usb_gadget_driver *driver,
 
412
                int (*bind)(struct usb_gadget *))
411
413
{
412
414
        struct lh7a40x_udc *dev = the_controller;
413
415
        int retval;
416
418
 
417
419
        if (!driver
418
420
                        || driver->speed != USB_SPEED_FULL
419
 
                        || !driver->bind
 
421
                        || !bind
420
422
                        || !driver->disconnect
421
423
                        || !driver->setup)
422
424
                return -EINVAL;
430
432
        dev->gadget.dev.driver = &driver->driver;
431
433
 
432
434
        device_add(&dev->gadget.dev);
433
 
        retval = driver->bind(&dev->gadget);
 
435
        retval = bind(&dev->gadget);
434
436
        if (retval) {
435
437
                printk(KERN_WARNING "%s: bind to driver %s --> error %d\n",
436
438
                       dev->gadget.name, driver->driver.name, retval);
452
454
 
453
455
        return 0;
454
456
}
455
 
 
456
 
EXPORT_SYMBOL(usb_gadget_register_driver);
 
457
EXPORT_SYMBOL(usb_gadget_probe_driver);
457
458
 
458
459
/*
459
460
  Unregister entry point for the peripheral controller driver.