]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/gspca/pac7311.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
[linux-2.6-omap-h63xx.git] / drivers / media / video / gspca / pac7311.c
index e5ff9a6199ef16261e85faec7d9ab85d97ebfc49..a9c95cba710e350e14fb70df6121d2a721700fa1 100644 (file)
@@ -226,7 +226,7 @@ static struct ctrl sd_ctrls[] = {
        },
 };
 
-static struct v4l2_pix_format vga_mode[] = {
+static const struct v4l2_pix_format vga_mode[] = {
        {160, 120, V4L2_PIX_FMT_PJPG, V4L2_FIELD_NONE,
                .bytesperline = 160,
                .sizeimage = 160 * 120 * 3 / 8 + 590,
@@ -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);
@@ -1061,10 +1064,13 @@ static __devinitdata struct usb_device_id device_table[] = {
        {USB_DEVICE(0x093a, 0x2608), .driver_info = SENSOR_PAC7311},
        {USB_DEVICE(0x093a, 0x260e), .driver_info = SENSOR_PAC7311},
        {USB_DEVICE(0x093a, 0x260f), .driver_info = SENSOR_PAC7311},
+       {USB_DEVICE(0x093a, 0x2620), .driver_info = SENSOR_PAC7302},
        {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);