diff options
Diffstat (limited to 'drivers/media/video/gspca/zc3xx.c')
-rw-r--r-- | drivers/media/video/gspca/zc3xx.c | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c index 79436f27cd4e..f1d8c7a08ba2 100644 --- a/drivers/media/video/gspca/zc3xx.c +++ b/drivers/media/video/gspca/zc3xx.c | |||
@@ -70,6 +70,10 @@ struct sd { | |||
70 | unsigned short chip_revision; | 70 | unsigned short chip_revision; |
71 | }; | 71 | }; |
72 | 72 | ||
73 | #define DRIVER_INFO(sensor, flags) .driver_info = ((sensor) << 8) | (flags) | ||
74 | #define DRIVER_INFO_GET_SENSOR(driver_info) ((driver_info) >> 8) | ||
75 | #define DRIVER_INFO_GET_FLAGS(driver_info) ((driver_info) & 0xff) | ||
76 | |||
73 | /* V4L2 controls supported by the driver */ | 77 | /* V4L2 controls supported by the driver */ |
74 | static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val); | 78 | static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val); |
75 | static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val); | 79 | static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val); |
@@ -7015,7 +7019,8 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
7015 | 7019 | ||
7016 | /* define some sensors from the vendor/product */ | 7020 | /* define some sensors from the vendor/product */ |
7017 | sd->sharpness = 2; | 7021 | sd->sharpness = 2; |
7018 | sd->sensor = id->driver_info; | 7022 | sd->sensor = DRIVER_INFO_GET_SENSOR(id->driver_info); |
7023 | gspca_dev->flags = DRIVER_INFO_GET_FLAGS(id->driver_info); | ||
7019 | sensor = zcxx_probeSensor(gspca_dev); | 7024 | sensor = zcxx_probeSensor(gspca_dev); |
7020 | if (sensor >= 0) | 7025 | if (sensor >= 0) |
7021 | PDEBUG(D_PROBE, "probe sensor -> %02x", sensor); | 7026 | PDEBUG(D_PROBE, "probe sensor -> %02x", sensor); |
@@ -7505,19 +7510,19 @@ static const __devinitdata struct usb_device_id device_table[] = { | |||
7505 | {USB_DEVICE(0x041e, 0x041e)}, | 7510 | {USB_DEVICE(0x041e, 0x041e)}, |
7506 | #ifndef CONFIG_USB_ZC0301 | 7511 | #ifndef CONFIG_USB_ZC0301 |
7507 | {USB_DEVICE(0x041e, 0x4017)}, | 7512 | {USB_DEVICE(0x041e, 0x4017)}, |
7508 | {USB_DEVICE(0x041e, 0x401c), .driver_info = SENSOR_PAS106}, | 7513 | {USB_DEVICE(0x041e, 0x401c), DRIVER_INFO(SENSOR_PAS106, 0)}, |
7509 | {USB_DEVICE(0x041e, 0x401e)}, | 7514 | {USB_DEVICE(0x041e, 0x401e)}, |
7510 | {USB_DEVICE(0x041e, 0x401f)}, | 7515 | {USB_DEVICE(0x041e, 0x401f)}, |
7511 | #endif | 7516 | #endif |
7512 | {USB_DEVICE(0x041e, 0x4029)}, | 7517 | {USB_DEVICE(0x041e, 0x4029)}, |
7513 | #ifndef CONFIG_USB_ZC0301 | 7518 | #ifndef CONFIG_USB_ZC0301 |
7514 | {USB_DEVICE(0x041e, 0x4034), .driver_info = SENSOR_PAS106}, | 7519 | {USB_DEVICE(0x041e, 0x4034), DRIVER_INFO(SENSOR_PAS106, 0)}, |
7515 | {USB_DEVICE(0x041e, 0x4035), .driver_info = SENSOR_PAS106}, | 7520 | {USB_DEVICE(0x041e, 0x4035), DRIVER_INFO(SENSOR_PAS106, 0)}, |
7516 | {USB_DEVICE(0x041e, 0x4036)}, | 7521 | {USB_DEVICE(0x041e, 0x4036)}, |
7517 | {USB_DEVICE(0x041e, 0x403a)}, | 7522 | {USB_DEVICE(0x041e, 0x403a)}, |
7518 | #endif | 7523 | #endif |
7519 | {USB_DEVICE(0x041e, 0x4051), .driver_info = SENSOR_TAS5130C_VF0250}, | 7524 | {USB_DEVICE(0x041e, 0x4051), DRIVER_INFO(SENSOR_TAS5130C_VF0250, 0)}, |
7520 | {USB_DEVICE(0x041e, 0x4053), .driver_info = SENSOR_TAS5130C_VF0250}, | 7525 | {USB_DEVICE(0x041e, 0x4053), DRIVER_INFO(SENSOR_TAS5130C_VF0250, 0)}, |
7521 | #ifndef CONFIG_USB_ZC0301 | 7526 | #ifndef CONFIG_USB_ZC0301 |
7522 | {USB_DEVICE(0x0458, 0x7007)}, | 7527 | {USB_DEVICE(0x0458, 0x7007)}, |
7523 | {USB_DEVICE(0x0458, 0x700c)}, | 7528 | {USB_DEVICE(0x0458, 0x700c)}, |
@@ -7543,11 +7548,13 @@ static const __devinitdata struct usb_device_id device_table[] = { | |||
7543 | {USB_DEVICE(0x046d, 0x08d9)}, | 7548 | {USB_DEVICE(0x046d, 0x08d9)}, |
7544 | {USB_DEVICE(0x046d, 0x08d8)}, | 7549 | {USB_DEVICE(0x046d, 0x08d8)}, |
7545 | {USB_DEVICE(0x046d, 0x08da)}, | 7550 | {USB_DEVICE(0x046d, 0x08da)}, |
7546 | {USB_DEVICE(0x046d, 0x08dd), .driver_info = SENSOR_MC501CB}, | 7551 | {USB_DEVICE(0x046d, 0x08dd), DRIVER_INFO(SENSOR_MC501CB, 0)}, |
7547 | {USB_DEVICE(0x0471, 0x0325), .driver_info = SENSOR_PAS106}, | 7552 | {USB_DEVICE(0x0471, 0x0325), DRIVER_INFO(SENSOR_PAS106, |
7548 | {USB_DEVICE(0x0471, 0x0326), .driver_info = SENSOR_PAS106}, | 7553 | GSPCA_SENSOR_UPSIDE_DOWN_FLAG)}, |
7549 | {USB_DEVICE(0x0471, 0x032d), .driver_info = SENSOR_PAS106}, | 7554 | {USB_DEVICE(0x0471, 0x0326), DRIVER_INFO(SENSOR_PAS106, |
7550 | {USB_DEVICE(0x0471, 0x032e), .driver_info = SENSOR_PAS106}, | 7555 | GSPCA_SENSOR_UPSIDE_DOWN_FLAG)}, |
7556 | {USB_DEVICE(0x0471, 0x032d), DRIVER_INFO(SENSOR_PAS106, 0)}, | ||
7557 | {USB_DEVICE(0x0471, 0x032e), DRIVER_INFO(SENSOR_PAS106, 0)}, | ||
7551 | {USB_DEVICE(0x055f, 0xc005)}, | 7558 | {USB_DEVICE(0x055f, 0xc005)}, |
7552 | #ifndef CONFIG_USB_ZC0301 | 7559 | #ifndef CONFIG_USB_ZC0301 |
7553 | {USB_DEVICE(0x055f, 0xd003)}, | 7560 | {USB_DEVICE(0x055f, 0xd003)}, |
@@ -7559,7 +7566,7 @@ static const __devinitdata struct usb_device_id device_table[] = { | |||
7559 | {USB_DEVICE(0x0ac8, 0x301b)}, | 7566 | {USB_DEVICE(0x0ac8, 0x301b)}, |
7560 | {USB_DEVICE(0x0ac8, 0x303b)}, | 7567 | {USB_DEVICE(0x0ac8, 0x303b)}, |
7561 | #endif | 7568 | #endif |
7562 | {USB_DEVICE(0x0ac8, 0x305b), .driver_info = SENSOR_TAS5130C_VF0250}, | 7569 | {USB_DEVICE(0x0ac8, 0x305b), DRIVER_INFO(SENSOR_TAS5130C_VF0250, 0)}, |
7563 | #ifndef CONFIG_USB_ZC0301 | 7570 | #ifndef CONFIG_USB_ZC0301 |
7564 | {USB_DEVICE(0x0ac8, 0x307b)}, | 7571 | {USB_DEVICE(0x0ac8, 0x307b)}, |
7565 | {USB_DEVICE(0x10fd, 0x0128)}, | 7572 | {USB_DEVICE(0x10fd, 0x0128)}, |