aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-01-14 15:35:15 -0500
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-01-15 08:46:20 -0500
commitc3aed262186841bf01feb9603885671ea567ebd9 (patch)
tree0d6b01e363dcca48460d259b6d567b4e248c42d5 /drivers/media
parentf52e9828d5f3001f11981d852dc9cbd3c8c5debe (diff)
[media] em28xx-cards: properly initialize the device bitmap
Instead of just creating a long int, use DECLARE_BITMAP(). No functional changes. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/usb/em28xx/em28xx-cards.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
index 6318e459744e..4d97a76cc3b0 100644
--- a/drivers/media/usb/em28xx/em28xx-cards.c
+++ b/drivers/media/usb/em28xx/em28xx-cards.c
@@ -66,7 +66,7 @@ MODULE_PARM_DESC(usb_xfer_mode,
66 66
67 67
68/* Bitmask marking allocated devices from 0 to EM28XX_MAXBOARDS - 1 */ 68/* Bitmask marking allocated devices from 0 to EM28XX_MAXBOARDS - 1 */
69static unsigned long em28xx_devused; 69DECLARE_BITMAP(em28xx_devused, EM28XX_MAXBOARDS);
70 70
71struct em28xx_hash_table { 71struct em28xx_hash_table {
72 unsigned long hash; 72 unsigned long hash;
@@ -2885,7 +2885,7 @@ void em28xx_release_resources(struct em28xx *dev)
2885 usb_put_dev(dev->udev); 2885 usb_put_dev(dev->udev);
2886 2886
2887 /* Mark device as unused */ 2887 /* Mark device as unused */
2888 clear_bit(dev->devno, &em28xx_devused); 2888 clear_bit(dev->devno, em28xx_devused);
2889 2889
2890 mutex_unlock(&dev->lock); 2890 mutex_unlock(&dev->lock);
2891}; 2891};
@@ -3094,7 +3094,7 @@ static int em28xx_usb_probe(struct usb_interface *interface,
3094 3094
3095 /* Check to see next free device and mark as used */ 3095 /* Check to see next free device and mark as used */
3096 do { 3096 do {
3097 nr = find_first_zero_bit(&em28xx_devused, EM28XX_MAXBOARDS); 3097 nr = find_first_zero_bit(em28xx_devused, EM28XX_MAXBOARDS);
3098 if (nr >= EM28XX_MAXBOARDS) { 3098 if (nr >= EM28XX_MAXBOARDS) {
3099 /* No free device slots */ 3099 /* No free device slots */
3100 printk(DRIVER_NAME ": Supports only %i em28xx boards.\n", 3100 printk(DRIVER_NAME ": Supports only %i em28xx boards.\n",
@@ -3102,7 +3102,7 @@ static int em28xx_usb_probe(struct usb_interface *interface,
3102 retval = -ENOMEM; 3102 retval = -ENOMEM;
3103 goto err_no_slot; 3103 goto err_no_slot;
3104 } 3104 }
3105 } while (test_and_set_bit(nr, &em28xx_devused)); 3105 } while (test_and_set_bit(nr, em28xx_devused));
3106 3106
3107 /* Don't register audio interfaces */ 3107 /* Don't register audio interfaces */
3108 if (interface->altsetting[0].desc.bInterfaceClass == USB_CLASS_AUDIO) { 3108 if (interface->altsetting[0].desc.bInterfaceClass == USB_CLASS_AUDIO) {
@@ -3355,7 +3355,7 @@ err_free:
3355 kfree(dev); 3355 kfree(dev);
3356 3356
3357err: 3357err:
3358 clear_bit(nr, &em28xx_devused); 3358 clear_bit(nr, em28xx_devused);
3359 3359
3360err_no_slot: 3360err_no_slot:
3361 usb_put_dev(udev); 3361 usb_put_dev(udev);