aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc
Commit message (Collapse)AuthorAge
...
* USB: remove unnecessary type casting of urb->contextMing Lei2008-04-25
| | | | | | | | urb->context code cleanup Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: replace remaining __FUNCTION__ occurrencesHarvey Harrison2008-04-25
| | | | | | | | __FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Remove EXPERIMENTAL designation from USB misc/ Kconfig entriesRobert P. J. Day2008-04-25
| | | | | | | | | Since nothing under the USB misc/ seems to be obviously experimental, remove the EXPERIMENTAL dependency from those Kconfig entries. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: remove dev->power.power_stateAlan Stern2008-04-25
| | | | | | | | | | | | | | | | power.power_state is scheduled for removal. This patch (as1053) removes all uses of that field from drivers/usb. Almost all of them were write-only, the most significant exceptions being sl811-hcd.c and u132-hcd.c. Part of this patch was written by Pavel Machek. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: David Brownell <david-b@pacbell.net> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: use DIV_ROUND_UPJulia Lawall2008-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) / (d)) but is perhaps more readable. An extract of the semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @haskernel@ @@ #include <linux/kernel.h> @depends on haskernel@ expression n,d; @@ ( - (n + d - 1) / d + DIV_ROUND_UP(n,d) | - (n + (d - 1)) / d + DIV_ROUND_UP(n,d) ) @depends on haskernel@ expression n,d; @@ - DIV_ROUND_UP((n),d) + DIV_ROUND_UP(n,d) @depends on haskernel@ expression n,d; @@ - DIV_ROUND_UP(n,(d)) + DIV_ROUND_UP(n,d) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: auerswald: Convert ccp->mutex in a mutexmatthias@kaehlcke.net2008-04-25
| | | | | | | | | The semaphore ccp->mutex is used as mutex, convert it to the mutex API Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Cc: Wolfgang Mües <wolfgang@iksw-muees.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: auerswald: Convert ccp->readmutex in a mutexmatthias@kaehlcke.net2008-04-25
| | | | | | | | | The semaphore ccp->readmutex is used as mutex, convert it to the mutex API Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Cc: Wolfgang Mües <wolfgang@iksw-muees.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: auerswald: Convert stats_sem in a mutexmatthias@kaehlcke.net2008-04-25
| | | | | | | | | The semaphore cp->mutex is used as mutex, convert it to the mutex API Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Cc: Wolfgang Mües <wolfgang@iksw-muees.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* drivers: Remove unnecessary inclusions of asm/semaphore.hMatthew Wilcox2008-04-18
| | | | | | | | | None of these files use any of the functionality promised by asm/semaphore.h. It's possible that they rely on it dragging in some unrelated header file, but I can't build all these files, so we'll have fix any build failures as they come up. Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
* USB: fix bug in sg initialization in usbtestAlan Stern2008-04-02
| | | | | | | | | | | This patch (as1062) fixes a bug in the scatter-gather initialization code in the usbtest driver. When the sg-helper conversion was performed, it wasn't done correctly. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: add new vernier product id to ldusb.cStephen Ware2008-02-21
| | | | | | | | | | I have a new ldusb device to go into the device table. Jiri has merged the change for hiddev quirks already. From: Stephen Ware <stephen.ware@eqware.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: fix error handling in trancevibratorOliver Neukum2008-02-21
| | | | | | | | trancevibrator should not pretend success if it returns an error. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: constify function pointer tablesJan Engelhardt2008-02-01
| | | | | | Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: misc: legousbtower: semaphore to mutexDaniel Walker2008-02-01
| | | | | | | | | | | | | | | | The dev->sem conforms to mutex style usage. This patch converts it to use the struct mutex type, and new API. There is also a small style fix around this comment, /* unlock here as tower_delete frees dev */ Where I broke the line up to meet the 80 char limit. Signed-off-by: Daniel Walker <dwalker@mvista.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Spelling fixesJoe Perches2008-02-01
| | | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: testing driver: don't free a locked mutexAndrew Morton2008-02-01
| | | | | | | | | | | | | Dopey thing to do and lockdep will (or should) warn. Spotted by Daniel Walker. Cc: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Cc: Daniel Walker <dwalker@mvista.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: testing driver: convert dev->sem to mutexMatthias Kaehlcke2008-02-01
| | | | | | | | | USB testing driver: convert semaphore dev->sem to the mutex API Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: cypress_cy7c63: updated contact/usage informationOliver Bock2008-02-01
| | | | | | | | | | | here's a minor update to the cypress_cy7c63 driver providing new contact and usage information. From: Oliver Bock <bock@tfh-berlin.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: sis FB driver: *_ioctl32_conversion functions do not exist in recent ↵Fernando Luis Vazquez Cao2008-02-01
| | | | | | | | | | | | | | kernels Remove dead code while at it. Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp> Cc: Thomas Winischhofer <thomas@winischhofer.net> Cc: Greg KH <greg@kroah.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: fix usbtest halt check on big endian systemsJan Andersson2008-02-01
| | | | | | | | | | | | usbtest did not swap the received status information when checking for a non-zero value and failed to discover halted endpoints on big endian systems. Cc: stable <stable@kernel.org> Signed-off-by: Jan Andersson <jan@gaisler.com> Acked-by: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: FIx locks and urb->status in adutux (updated)Pete Zaitcev2007-11-28
| | | | | | | | | | | | | | | | | | | | Two main issues fixed here are: - An improper use of in-struct lock to protect an open count - Use of urb status for -EINPROGRESS Also, along the way: - Change usb_unlink_urb to usb_kill_urb. Apparently there's no need to use usb_unlink_urb whatsoever in this driver, and the old use of usb_kill_urb was outright racy (it unlinked and immediately freed). - Fix indentation in adu_write. Looks like it was damaged by a script. - Vitaly wants -EBUSY on multiply opens. - bInterval was taken from a wrong endpoint. Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Vitaliy Ivanov <vitalivanov@gmail.com> Tested-by: Vitaliy Ivanov <vitalivanov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: fix usbled disconnect read race #2Oliver Neukum2007-11-28
| | | | | | | | | | | usbled has a race where show methods for attributes in sysfs can follow a NULL pointer during disconnect. The correct ordering fixes it. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: open disconnect race in usblcdOliver Neukum2007-10-25
| | | | | | | | | this driver has a possible use after free due to a race when disconnect and open handle intfdata without a lock. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: disconnect open race in legousbtowerOliver Neukum2007-10-25
| | | | | | | | again, possible use after free due to touching intfdata without lock. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: open disconnect race in iowarriorOliver Neukum2007-10-25
| | | | | | | | | the driver sets intfdata to NULL without lock. Data structures can be freed and accessed. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: missing error check in emi62Oliver Neukum2007-10-25
| | | | | | | | the emi62 also lacks an error check. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: missing error check in emi26Oliver Neukum2007-10-25
| | | | | | | | this drivers lacks an error check. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: fix read vs. disconnect race in cytherm driverOliver Neukum2007-10-25
| | | | | | | | | | | the disconnect method of this driver set intfdata to NULL before removing attribute files. The attributes' read methods will happily follow the NULL pointer. Here's the correct ordering. Signed-off-by : Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: fix locking in idmouseOliver Neukum2007-10-25
| | | | | | | | | | | | | Pete caused me to lock at buggy drivers in this respect. The idmouse has a race between open and disconnect. This patch - solves the open/disconnect race - switches locking to mutexes Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB rio500.c: fix check-after-useAdrian Bunk2007-10-25
| | | | | | | | | | | | | | | The Coverity checker spotted that we have already oops'ed if "dev" was NULL in these places. Since "dev" being NULL isn't possible at these places this patch removes the NULL checks. Additionally, I've fixed the formatting of the if's. Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB iowarrior.c: fix check-after-useAdrian Bunk2007-10-25
| | | | | | | | | | | | | The Coverity checker spotted that we have already oops'ed if "dev" was NULL. Since "dev" being NULL doesn't seem to be possible here this patch removes the NULL check. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: FTDI Elan driver: Convert ftdi->u132_lock to mutexMatthias Kaehlcke2007-10-25
| | | | | | | | | FTDI Elan driver: Convert the semaphore ftdi->u132_lock to the mutex API Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PARPORT] Kill useful 'irq' arg from parport_{generic_irq,ieee1284_interrupt}Jeff Garzik2007-10-23
| | | | | | | | | | | | | parport_ieee1284_interrupt() was not using its first arg at all. Delete. parport_generic_irq()'s second arg makes its first arg completely redundant. Delete, and use port->irq in the one place where we actually need it. Also, s/__inline__/inline/ to make the code look nicer. Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* [SG] Update drivers to use sg helpersJens Axboe2007-10-22
| | | | Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* Convert files to UTF-8 and some cleanupsJan Engelhardt2007-10-19
| | | | | | | | | | | | | | | | | | * Convert files to UTF-8. * Also correct some people's names (one example is Eißfeldt, which was found in a source file. Given that the author used an ß at all in a source file indicates that the real name has in fact a 'ß' and not an 'ss', which is commonly used as a substitute for 'ß' when limited to 7bit.) * Correct town names (Goettingen -> Göttingen) * Update Eberhard Mönkeberg's address (http://lkml.org/lkml/2007/1/8/313) Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Adrian Bunk <bunk@kernel.org>
* Add missing newlines to some uses of dev_<level> messagesJoe Perches2007-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found these while looking at printk uses. Add missing newlines to dev_<level> uses Add missing KERN_<level> prefixes to multiline dev_<level>s Fixed a wierd->weird spelling typo Added a newline to a printk Signed-off-by: Joe Perches <joe@perches.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Mark M. Hoffman <mhoffman@lightlink.com> Cc: Roland Dreier <rolandd@cisco.com> Cc: Tilman Schmidt <tilman@imap.cc> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Jeff Garzik <jeff@garzik.org> Cc: Stephen Hemminger <shemminger@linux-foundation.org> Cc: Greg KH <greg@kroah.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: David Brownell <david-b@pacbell.net> Cc: James Smart <James.Smart@Emulex.Com> Cc: Andrew Vasquez <andrew.vasquez@qlogic.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Jaroslav Kysela <perex@suse.cz> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* vt/vgacon: Check if screen resize request comes from userspaceAntonino A. Daplas2007-10-16
| | | | | | | | | | | | | | | | | | | | | | | | | Various console drivers are able to resize the screen via the con_resize() hook. This hook is also visible in userspace via the TIOCWINSZ, VT_RESIZE and VT_RESIZEX ioctl's. One particular utility, SVGATextMode, expects that con_resize() of the VGA console will always return success even if the resulting screen is not compatible with the hardware. However, this particular behavior of the VGA console, as reported in Kernel Bugzilla Bug 7513, can cause undefined behavior if the user starts with a console size larger than 80x25. To work around this problem, add an extra parameter to con_resize(). This parameter is ignored by drivers except for vgacon. If this parameter is non-zero, then the resize request came from a VT_RESIZE or VT_RESIZEX ioctl and vgacon will always return success. If this parameter is zero, vgacon will return -EINVAL if the requested size is not compatible with the hardware. The latter is the more correct behavior. With this change, SVGATextMode should still work correctly while in-kernel and stty resize calls can expect correct behavior from vgacon. Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* USB: drivers/usb/misc/sisusbvga/sisusb.c: kill two unused variablesWANG Cong2007-10-12
| | | | | | | | | Kill two unused variables in drivers/usb/misc/sisusbvga/sisusb.c. Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: fix gregkh-usb-usb-sisusb2vga-convert-printk-to-dev_-macrosAndrew Morton2007-10-12
| | | | | | | | | | | | | | | drivers/usb/misc/sisusbvga/sisusb.c: In function 'sisusb_open': drivers/usb/misc/sisusbvga/sisusb.c:2444: warning: 'sisusb' is used uninitialized in this function I can tell that'll oops just by looking at it. How come this code assume a 7,000 column xterm? :( Cc: Felipe Balbi <felipe.lima@indt.org.br> Cc: Thomas <thomas@winischhofer.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: sisusbvga: Fix bugSatyam Sharma2007-10-12
| | | | | | | | | | | | | | drivers/usb/misc/sisusbvga/sisusb.c: In function sisusb_open drivers/usb/misc/sisusbvga/sisusb.c:2444: warning: sisusb is used uninitialized in this function is a genuine bug (which will cause oops). We cannot use "sisusb" in error path for (!interface), because sisusb will itself be derived from "interface" later. Signed-off-by: Satyam Sharma <satyam@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: fix memory leak in berry_charge driverGreg Kroah-Hartman2007-10-12
| | | | | | | | This fixes a small memory leak that happens every time the device is plugged in. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: missing test for ESHUTDOWN in adutux driverOliver Neukum2007-10-12
| | | | | | | | this driver lacks a test for unlink due to ESHUTDOWN Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: ftdi-elan.c: kmalloc + memset conversion to kzallocMariusz Kozlowski2007-10-12
| | | | | | | | | | drivers/usb/misc/ftdi-elan.c | 121253 -> 121196 (-57 bytes) drivers/usb/misc/ftdi-elan.o | 209425 -> 209265 (-160 bytes) 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>
* USB: SisUSB2VGA: Convert printk to dev_* macrosFelipe Balbi2007-10-12
| | | | | | | | | | This patch convert printk entries to dev_* macros, this provide better debugging and better readability to the code. Signed-off-by: Felipe Balbi <felipe.lima@indt.org.br> Cc: Thomas <thomas@winischhofer.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: SisUSB2VGA: Lindent drivers/usb/misc/sisusbvga/sisusb_struct.hFelipe Balbi2007-10-12
| | | | | | | | | Better indentation Signed-off-by: Felipe Balbi <felipe.lima@indt.org.br> Cc: Thomas Winischhofer <thomas@winischhofer.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: SisUSB2VGA: Lindent drivers/usb/misc/sisusbvga/sisusb_init.hFelipe Balbi2007-10-12
| | | | | | | | | Better indentation Signed-off-by: Felipe Balbi <felipe.lima@indt.org.br> Cc: Thomas Winischhofer <thomas@winischhofer.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: SisUSB2VGA: Lindent drivers/usb/misc/sisusbvga/sisusb_init.cFelipe Balbi2007-10-12
| | | | | | | | | Better indentation Signed-off-by: Felipe Balbi <felipe.lima@indt.org.br> Cc: Thomas Winischhofer <thomas@winischhofer.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: SisUSB2VGA: Lindent drivers/usb/misc/sisusbvga/sisusb.hFelipe Balbi2007-10-12
| | | | | | | | | Better indentation Signed-off-by: Felipe Balbi <felipe.lima@indt.org.br> Cc: Thomas Winischhofer <thomas@winischhofer.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: SisUSB2VGA: Mis-spelled wordFelipe Balbi2007-10-12
| | | | | | | | | Trivial fix Signed-off-by: Felipe Balbi <felipe.lima@indt.org.br> Cc: Thomas Winischhofer <thomas@winischhofer.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: SisUSB2VGA: Remove if 0'ed codeFelipe Balbi2007-10-12
| | | | | | | | | | Unused code should be removed. We don't need to increase the size of the file with dead code inside if 0 statements. Signed-off-by: Felipe Balbi <felipe.lima@indt.org.br> Cc: Thomas Winischhofer <thomas@winischhofer.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>