From: Thierry Reding Date: Thu, 4 Aug 2011 07:14:11 +0000 (-0300) Subject: [media] tm6000: Properly count device usage X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6f2e77bb955771a7b8de80ea519c1e9a82b864dd;p=linux-beck.git [media] tm6000: Properly count device usage When the USB device is disconnected, the device usage bit is not cleared properly. This leads to errors when a device is unplugged and replugged several times until all TM6000_MAXBOARDS bits are used and keeps the driver from binding to the device. Signed-off-by: Thierry Reding Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c index f247e7e685f9..d2ee18ffd49f 100644 --- a/drivers/staging/tm6000/tm6000-cards.c +++ b/drivers/staging/tm6000/tm6000-cards.c @@ -1171,7 +1171,7 @@ static int tm6000_usb_probe(struct usb_interface *interface, mutex_init(&dev->usb_lock); /* Increment usage count */ - tm6000_devused |= 1<name, 29, "tm6000 #%d", nr); dev->model = id->driver_info; @@ -1287,7 +1287,7 @@ static int tm6000_usb_probe(struct usb_interface *interface, err: printk(KERN_ERR "tm6000: Error %d while registering\n", rc); - tm6000_devused &= ~(1<devno, &tm6000_devused); kfree(dev); }