]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/gspca/pac7311.c
V4L/DVB (10011): m5602: Remove the write and read sensor from the main struct
[linux-2.6-omap-h63xx.git] / drivers / media / video / gspca / pac7311.c
index e5ff9a6199ef16261e85faec7d9ab85d97ebfc49..80af367bd3503ff27ad87078c395917da47e52b4 100644 (file)
@@ -749,10 +749,13 @@ static void sd_stopN(struct gspca_dev *gspca_dev)
        reg_w(gspca_dev, 0x78, 0x44); /* Bit_0=start stream, Bit_6=LED */
 }
 
+/* called on streamoff with alt 0 and on disconnect */
 static void sd_stop0(struct gspca_dev *gspca_dev)
 {
        struct sd *sd = (struct sd *) gspca_dev;
 
+       if (!gspca_dev->present)
+               return;
        if (sd->sensor == SENSOR_PAC7302) {
                reg_w(gspca_dev, 0xff, 0x01);
                reg_w(gspca_dev, 0x78, 0x40);
@@ -1062,9 +1065,11 @@ static __devinitdata struct usb_device_id device_table[] = {
        {USB_DEVICE(0x093a, 0x260e), .driver_info = SENSOR_PAC7311},
        {USB_DEVICE(0x093a, 0x260f), .driver_info = SENSOR_PAC7311},
        {USB_DEVICE(0x093a, 0x2621), .driver_info = SENSOR_PAC7302},
+       {USB_DEVICE(0x093a, 0x2622), .driver_info = SENSOR_PAC7302},
        {USB_DEVICE(0x093a, 0x2624), .driver_info = SENSOR_PAC7302},
        {USB_DEVICE(0x093a, 0x2626), .driver_info = SENSOR_PAC7302},
        {USB_DEVICE(0x093a, 0x262a), .driver_info = SENSOR_PAC7302},
+       {USB_DEVICE(0x093a, 0x262c), .driver_info = SENSOR_PAC7302},
        {}
 };
 MODULE_DEVICE_TABLE(usb, device_table);