]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
USB: stop abuse of intfdata in cypress_m8
authorOliver Neukum <oliver@neukum.org>
Tue, 22 Jan 2008 14:54:54 +0000 (15:54 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Feb 2008 22:35:04 +0000 (14:35 -0800)
commit9e3b1d8e3d5d135ac7be43f6710b7a67b569c292
treed49c28ab6eb379e9cdc7cd9d28110c0967790486
parent0b3f5fe673d4626ea91816ca9c486b43b39a2fd1
USB: stop abuse of intfdata in cypress_m8

this driver uses usb_get_intfdata() == NULL as a test for disconnect().
You must not do that as this races with probe(). By the time you test
your erstwhile interface may already be somebody else's interface.
This fixes the close() method of cypress_m8 to use the recently introduced
flag and use locking against disconnect() where required in close().

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/cypress_m8.c