aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-10-16vt/vgacon: Check if screen resize request comes from userspaceAntonino A. Daplas1-1/+2
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>
2007-10-12USB: drivers/usb/misc/sisusbvga/sisusb.c: kill two unused variablesWANG Cong1-2/+0
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>
2007-10-12USB: fix gregkh-usb-usb-sisusb2vga-convert-printk-to-dev_-macrosAndrew Morton1-9/+1
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>
2007-10-12USB: sisusbvga: Fix bugSatyam Sharma1-3/+1
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>
2007-10-12USB: fix memory leak in berry_charge driverGreg Kroah-Hartman1-2/+5
This fixes a small memory leak that happens every time the device is plugged in. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12USB: missing test for ESHUTDOWN in adutux driverOliver Neukum1-1/+2
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>
2007-10-12USB: ftdi-elan.c: kmalloc + memset conversion to kzallocMariusz Kozlowski1-3/+5
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>
2007-10-12USB: SisUSB2VGA: Convert printk to dev_* macrosFelipe Balbi2-88/+36
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>
2007-10-12USB: SisUSB2VGA: Lindent drivers/usb/misc/sisusbvga/sisusb_struct.hFelipe Balbi1-75/+67
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>
2007-10-12USB: SisUSB2VGA: Lindent drivers/usb/misc/sisusbvga/sisusb_init.hFelipe Balbi1-656/+655
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>
2007-10-12USB: SisUSB2VGA: Lindent drivers/usb/misc/sisusbvga/sisusb_init.cFelipe Balbi1-129/+133
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>
2007-10-12USB: SisUSB2VGA: Lindent drivers/usb/misc/sisusbvga/sisusb.hFelipe Balbi1-60/+58
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>
2007-10-12USB: SisUSB2VGA: Mis-spelled wordFelipe Balbi1-1/+1
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>
2007-10-12USB: SisUSB2VGA: Remove if 0'ed codeFelipe Balbi4-197/+1
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>
2007-10-12USB: SisUSB2VGA: Whitespace CleanupsFelipe Balbi5-20/+20
This patches clean some trailing whitespaces in sisusb2vga driver. 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>
2007-09-11usb/misc/sisusbvga: add product ID of TARGUS/MCT devicesamson yeung1-0/+1
Device is Targus ACP50US which includes a Magic Control Technologies usb vga device using the SiS315(E) or compatible. Signed-off-by: Samson Yeung <fragmede@onepatchdown.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-22Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlightLinus Torvalds1-2/+2
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight: leds: cr_bllcd.c: build fix backlight: Convert from struct class_device to struct device backlight: Fix order of Kconfig entries
2007-07-19USB: misc: uss720: clean up urb->status usageGreg Kroah-Hartman1-2/+3
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: misc: usbtest: clean up urb->status usageGreg Kroah-Hartman1-2/+2
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: misc: usblcd: clean up urb->status usageGreg Kroah-Hartman1-5/+6
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: misc: phidgetmotorcontrol: clean up urb->status usageGreg Kroah-Hartman1-6/+7
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: misc: phidgetkit: clean up urb->status usageGreg Kroah-Hartman1-6/+7
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: misc: legousbtower: clean up urb->status usageGreg Kroah-Hartman1-13/+15
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: misc: ldusb: clean up urb->status usageGreg Kroah-Hartman1-9/+11
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: misc: iowarrior: clean up urb->status usageGreg Kroah-Hartman1-9/+12
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: misc: ftdi-elan: clean up urb->status usageGreg Kroah-Hartman1-3/+5
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: misc: auerswald: clean up urb->status usageGreg Kroah-Hartman1-10/+15
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: misc: appledisplay: clean up urb->status usageGreg Kroah-Hartman1-4/+5
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: misc: adtux: clean up urb->status usageGreg Kroah-Hartman1-11/+13
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: use mutex instead of semaphore in the FTDI ELAN driverMatthias Kaehlcke1-6/+7
The FTDI ELAN driver uses a semaphore as mutex. Use the mutex API instead of the (binary) semaphore. Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: use mutex instead of semaphore in the Adutux driverMatthias Kaehlcke1-17/+18
The Adutux driver uses a semaphore as mutex. Use the mutex API instead of the (binary) semaphore. Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-17drivers/*: mark variables with uninitialized_var()Jeff Garzik1-1/+1
Mark variables in drivers/* with uninitialized_var() if such a warning appears, and analysis proves that the var is initialized properly on all paths it is used. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-17drivers/usb/misc/auerswald: fix status check, remove redundant checkJeff Garzik1-1/+1
1) We should only set 'actual_length' output variable if usb length is known to be good. 2) No need to check actual_length for NULL. The only caller always passes non-NULL value. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-16backlight: Convert from struct class_device to struct deviceRichard Purdie1-2/+2
Convert the backlight and LCD classes from struct class_device to struct device since class_device is scheduled for removal. One nasty API break is the backlight power attribute has had to be renamed to bl_power and the LCD power attribute has had to be renamed to lcd_power since the original names clash with the core. I can't see a way around this. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12USB: Support Blackberry Pearl with berry_chargeJeremy Katz1-0/+35
The Blackberry Pearl (8100) needs similar tweaks as older Blackberry models to be able to charge when connected via USB. The Pearl also adds an additional need to go into a separate mode for fully accessing the device; do that by default as well. Changes based on the changes from bcharge in the barry project (http://barry.sf.net) Signed-off-by: Jeremy Katz <katzj@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12USB: autosuspend for usblcdOliver Neukum1-3/+43
this patch implements autosuspend for the usblcd driver. It uses the new usb_anchor infrastructure. Many thanks to Georges for testing. Signed-off-by: Oliver Neukum <oneukum@suse.de> Cc: Georges Toth <g.toth@e-biz.lu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12USB: prevent char device open/deregister raceAlan Stern10-198/+62
This patch (as908) adds central protection in usbcore for the prototypical race between opening and unregistering a char device. The spinlock used to protect the minor-numbers array is replaced with an rwsem, which can remain locked across a call to a driver's open() method. This guarantees that open() and deregister() will be mutually exclusive. The private locks currently used in several individual drivers for this purpose are no longer necessary, and the patch removes them. The following USB drivers are affected: usblcd, idmouse, auerswald, legousbtower, sisusbvga/sisusb, ldusb, adutux, iowarrior, and usb-skeleton. As a side effect of this change, usb_deregister_dev() must not be called while holding a lock that is acquired by open(). Unfortunately a number of drivers do this, but luckily the solution is simple: call usb_deregister_dev() before acquiring the lock. In addition to these changes (and their consequent code simplifications), the patch fixes a use-after-free bug in adutux and a race between open() and release() in iowarrior. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-06potential compiler error, irqfunc caller sites updateYoann Padioleau1-1/+1
In 7d12e780e003f93433d49ce78cfedf4b4c52adc5 David Howells performed this evolution: "IRQ: Maintain regs pointer globally rather than passing to IRQ handlers" He correctly updated many of the function definitions that were using this extra regs pointer parameter but forgot to update some caller sites of those functions. The reason the modifications was not properly done on all drivers is that some drivers were rarely compiled because they are for AMIGA, or that some code sites were inside #ifdefs where the option is not set or inside #if 0. Here is the semantic patch that found the occurences and fixed the problem. @ rule1 @ identifier fn; identifier irq, dev_id; typedef irqreturn_t; @@ static irqreturn_t fn(int irq, void *dev_id) { ... } @@ identifier rule1.fn; expression E1, E2, E3; @@ fn(E1, E2 - ,E3 ) Signed-off-by: Yoann Padioleau <padator@wanadoo.fr> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jeff Garzik <jeff@garzik.org> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-25USB: usblcd doesn't limit memory consumption during writeOliver Neukum1-4/+18
usblcd currently has no way to limit memory consumption by fast writers. This is a security problem, as it allows users with write access to this device to drive the system into oom despite resource limits. Here's the fix taken from the modern skeleton driver. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-06-25USB: memory leak in iowarrior.cOliver Neukum1-3/+4
this is a classical memory leak in the ioctl handler. The buffer is simply never freed. This fixes it the obvious way. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22USB: ldusb bugfixOliver Neukum1-4/+31
This patch fixes a problem reported with consecutive reads in the ldusb driver. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22USB: auerswald: fix file release handlerAndrew Morton1-8/+2
If this down_interruptible() does fail due to signal_pending() then the state of the driver will get trashed in interesting ways, because userspace cannot and will not retry the close(). Cc: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22USB: fix more ftdi-elan/u132-hcd #include lossageDavid Brownell1-4/+8
Partial fix for bogosity in the ftdi-elan and u132-hcd drivers ... these have no business including with the internals of other drivers, much less doing so in a broken way!! A previous patch resolved one build fix, this resolves another... Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-09Fix occurrences of "the the "Michael Opdenacker1-1/+1
Signed-off-by: Michael Opdenacker <michael@free-electrons.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-05-08SIS USB2VGA Warning fixWANG Cong1-1/+1
drivers/usb/misc/sisusbvga/sisusb_con.c:1436: warning: initialization from incompatible pointer type Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08header cleaning: don't include smp_lock.h when not usedRandy Dunlap4-4/+0
Remove includes of <linux/smp_lock.h> where it is not used/needed. Suggested by Al Viro. Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc, sparc64, and arm (all 59 defconfigs). Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-27USB: iowarrior.c: timeouts too small in usb_control_msg callsEberhard Fahle1-8/+6
The driver uses usb_control_msg() for exchanging data with the device. When the driver lived freeley _outside_ the kernel tree (pre 2.6.21) the timeouts for these calls where set to 5*HZ for reading, 1HZ for writing. (These timeouts seemed to work fine for all users of the driver, at least nobody complained in the last 2 years. The current code (2.6.21-rc5) removed the 'HZ' from the timeouts and left the driver with 5 jiffies for reading and 1 jiffy for writing. My new machine is fast, but not that fast. The patch also removes a useless debug statement, which was left over from testing a broken firmware version From: Eberhard Fahle <e.fahle@wayoda.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: add picdem device to ldusbJoey Goncalves1-0/+3
Hi Greg: I have found that /drivers/usb/misc/ldusb.c works with the "PICDEM Full Speed USB" http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en021940 Signed-off-by: Joey S Goncalves <jgoncalves@peragrin.com> Cc: Michael Hund <MHund@LD-Didactic.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: Remove duplicate define of OHCI_QUIRK_ZFMICROS.Caglar Onur1-1/+0
Remove duplicate define of OHCI_QUIRK_ZFMICRO from ftdi-elan.c, its already defined in drivers/ush/host/ohci.c Signed-off-by: "S.Caglar Onur" <caglar@pardus.org.tr> Cc: <tony.olech@elandigitalsystems.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB Elan FTDI: check for driver registration statusCyrill Gorcunov1-7/+11
Add checking of driver registration status and release allocated resources if it failed. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Cc: Pete Zaitcev <zaitcev@redhat.com> Cc: "Luiz Fernando N. Capitulino" <lcapitulino@mandriva.com.br> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>