From 0915f490d81c1a5098b399ec6c0be45bd421ee1d Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Wed, 23 Jan 2008 12:28:45 +0100 Subject: USB: last abuses of intfdata in close for usb-serial drivers these drivers abused intfdata in close() as flags for binding. That races with reprobing of those devices. This patch fixes that by using the flag and the locks introduced with the patch against mos7720. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/pl2303.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/usb/serial/pl2303.c') diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index ac3d8765f48..ae3ec1a6400 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c @@ -667,7 +667,7 @@ static void pl2303_close(struct usb_serial_port *port, struct file *filp) set_current_state(TASK_INTERRUPTIBLE); if (pl2303_buf_data_avail(priv->buf) == 0 || timeout == 0 || signal_pending(current) || - !usb_get_intfdata(port->serial->interface)) /* disconnect */ + port->serial->disconnected) break; spin_unlock_irqrestore(&priv->lock, flags); timeout = schedule_timeout(timeout); -- cgit