summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/amd5536udc.c
AgeCommit message (Collapse)Author
2010-10-22USB: gadget: amd5536udc.c: fix error pathRahul Ruikar
In function udc_probe() call put_device() when device_register() fails. Signed-off-by: Rahul Ruikar <rahul.ruikar@gmail.com> Acked-by: Thomas Dahlmann <dahlmann.thomas@arcor.de> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-22USB: gadget: amd5536udc.c: Remove double testJulia Lawall
The same expression is tested twice and the result is the same each time. Instead test for use_dma_ppb as in the test above. The sematic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @expression@ expression E; @@ ( * E || ... || E | * E && ... && E ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-22usb gadget: don't save bind callback in struct usb_gadget_driverUwe Kleine-König
To accomplish this the function to register a gadget driver takes the bind function as a second argument. To make things clearer rename the function to resemble platform_driver_probe. This fixes many section mismatches like WARNING: drivers/usb/gadget/g_printer.o(.data+0xc): Section mismatch in reference from the variable printer_driver to the function .init.text:printer_bind() The variable printer_driver references the function __init printer_bind() All callers are fixed. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [m.nazarewicz@samsung.com: added dbgp] Signed-off-by: Michał Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-30usb: amd5536udc: fixed shared interrupt bug and warning oopsThomas Dahlmann
- fixed shared interrupt bug reported by Vadim Lobanov - fixed possible warning oops on driver unload when connected - prevent interrupt flood in PIO mode ("modprobe amd5536udc use_dma=0") when using gadget ether Signed-off-by: Thomas Dahlmann <dahlmann.thomas@arcor.de> Cc: Robert Richter <robert.richter@amd.com> Cc: David Brownell <david-b@pacbell.net> Cc: stable <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-23USB: gadget: Drop NULL test on list_entry resultJulia Lawall
list_entry, which is an alias for container_of, cannot return NULL, as there is no way to add a NULL value to a doubly linked list. A simplified version of the semantic match that findds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r@ expression x,E; statement S1,S2; position p,p1; @@ *x = list_entry@p(...) ... when != x = E *if@p1 (x == NULL) S1 else S2 // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-12headers: smp_lock.h reduxAlexey Dobriyan
* Remove smp_lock.h from files which don't need it (including some headers!) * Add smp_lock.h to files which do need it * Make smp_lock.h include conditional in hardirq.h It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT This will make hardirq.h inclusion cheaper for every PREEMPT=n config (which includes allmodconfig/allyesconfig, BTW) Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-24USB: replace uses of __constant_{endian}Harvey Harrison
The base versions handle constant folding now. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-08-23removed unused #include <linux/version.h>'sAdrian Bunk
This patch lets the files using linux/version.h match the files that #include it. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-21USB: usb dev_set_name() instead of dev->bus_idKay Sievers
The bus_id field is going away, use the dev_set_name() function to set it properly. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-05-14usb: fix integer as NULL pointer warnings found by sparseHarvey Harrison
drivers/usb/host/ohci-sm501.c:93:24: warning: Using plain integer as NULL pointer drivers/usb/gadget/amd5536udc.c:3254:9: warning: Using plain integer as NULL pointer drivers/usb/gadget/amd5536udc.c:3267:9: warning: Using plain integer as NULL pointer drivers/usb/gadget/amd5536udc.c:3277:9: warning: Using plain integer as NULL pointer drivers/usb/gadget/amd5536udc.c:3285:9: warning: Using plain integer as NULL pointer drivers/usb/gadget/amd5536udc.c:3293:9: warning: Using plain integer as NULL pointer Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-28drivers/usb annotations and fixesAl Viro
* endianness annotations * endianness fixes * missing get_unaligned/put_unaligned It's pretty much all over the place, changes to different files are independent. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Serial-parts-Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-24USB: mem leak fixes for AMD 5536 UDC high/full speed USB device controller ↵Jesper Juhl
driver In drivers/usb/gadget/amd5536udc.c::udc_pci_probe(), sizeof(struct udc) storage is allocated for 'dev'. There are many exit points from the function where 'dev' is not free'd but has also not yet been used for anything. The following patch free's 'dev' at the return points where it has not yet been used. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: usb peripheral controller driver oops avoidancePatrik Sevallius
I'm having problem with oopses when rebooting, if I modprobe g_serial and rmmod g_serial and do a reboot I get an oops in device_shutdown(). The reason seems to be that usb_gadget_unregister_driver() doesn't do enough cleanup. With this at91_udc patch I don't get the oops. Signed-off-by: Patrik Sevallius <patrik.sevallius@enea.com> [ Same bug was in other peripheral controller drivers; fixed ] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: Add missing "space" to printk messagesJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> Acked-by: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25USB: amd5536udc - remove set_mwi() compiler warningDavid Brownell
Get rid of pointless pci_set_mwi() compiler warning. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12USB: move <linux/usb_gadget.h> to <linux/usb/gadget.h>David Brownell
Move <linux/usb_gadget.h> to <linux/usb/gadget.h>, reducing some of the clutter in the main include directory. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12USB: AMD5536: use pdev->revisionAuke Kok
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Cc: Thomas Dahlmann <thomas.dahlmann@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12usb: remove redundant memset from amd5536udcMariusz Kozlowski
Remove redundant memset() call from udc_pci_probe(). No functional change. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: amd5536 UDC driver (in GEODE southbridge)Thomas Dahlmann
Driver for the AMD5536 UDC, as found in the AMD Geode CS5536 (southbridge). This is a high speed DMA-capable controller, which can also be used in OTG configurations (which are not supported by this patch). Acked-by: Jordan Crouse <jordan.crouse@amd.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>