usb: Increase timeout value for device reset
[safe/jmp/linux-2.6] / drivers / ieee1394 / dv1394.c
index cb15bfa..9fd4a0d 100644 (file)
    0 - no debugging messages
    1 - some debugging messages, but none during DMA frame transmission
    2 - lots of messages, including during DMA frame transmission
-       (will cause undeflows if your machine is too slow!)
+       (will cause underflows if your machine is too slow!)
 */
 
 #define DV1394_DEBUG_LEVEL 0
@@ -1789,12 +1789,13 @@ static int dv1394_open(struct inode *inode, struct file *file)
        } else {
                /* look up the card by ID */
                unsigned long flags;
+               int idx = ieee1394_file_to_instance(file);
 
                spin_lock_irqsave(&dv1394_cards_lock, flags);
                if (!list_empty(&dv1394_cards)) {
                        struct video_card *p;
                        list_for_each_entry(p, &dv1394_cards, list) {
-                               if ((p->id) == ieee1394_file_to_instance(file)) {
+                               if ((p->id) == idx) {
                                        video = p;
                                        break;
                                }
@@ -1803,7 +1804,7 @@ static int dv1394_open(struct inode *inode, struct file *file)
                spin_unlock_irqrestore(&dv1394_cards_lock, flags);
 
                if (!video) {
-                       debug_printk("dv1394: OHCI card %d not found", ieee1394_file_to_instance(file));
+                       debug_printk("dv1394: OHCI card %d not found", idx);
                        return -ENODEV;
                }
 
@@ -2171,7 +2172,7 @@ static const struct file_operations dv1394_fops=
  * Export information about protocols/devices supported by this driver.
  */
 #ifdef MODULE
-static struct ieee1394_device_id dv1394_id_table[] = {
+static const struct ieee1394_device_id dv1394_id_table[] = {
        {
                .match_flags    = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION,
                .specifier_id   = AVC_UNIT_SPEC_ID_ENTRY & 0xffffff,