aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorHans de Goede <j.w.r.degoede@hhs.nl>2008-09-03 16:12:13 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-09-03 17:37:22 -0400
commitd6db35e89c420d867e9ffdf145ecf2cb1b91291b (patch)
tree733583a3fd669c9f78a0fe65788d3953542f3dee /drivers/media
parent6d8976164dd7d10d25fe940b8546265f60ad52cd (diff)
V4L/DVB (8809): gspca: Revert commit 9a9335776548d01525141c6e8f0c12e86bbde982
the previous patch (sensor upside down). Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/gspca/gspca.c2
-rw-r--r--drivers/media/video/gspca/gspca.h4
-rw-r--r--drivers/media/video/gspca/zc3xx.c31
3 files changed, 12 insertions, 25 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index 0b292ca0c080..bffddf527759 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -851,8 +851,6 @@ static int vidioc_querycap(struct file *file, void *priv,
851 cap->capabilities = V4L2_CAP_VIDEO_CAPTURE 851 cap->capabilities = V4L2_CAP_VIDEO_CAPTURE
852 | V4L2_CAP_STREAMING 852 | V4L2_CAP_STREAMING
853 | V4L2_CAP_READWRITE; 853 | V4L2_CAP_READWRITE;
854 if (gspca_dev->flags & GSPCA_SENSOR_UPSIDE_DOWN_FLAG)
855 cap->capabilities |= V4L2_CAP_SENSOR_UPSIDE_DOWN;
856 return 0; 854 return 0;
857} 855}
858 856
diff --git a/drivers/media/video/gspca/gspca.h b/drivers/media/video/gspca/gspca.h
index 1920c99d6f4a..2596568e82fd 100644
--- a/drivers/media/video/gspca/gspca.h
+++ b/drivers/media/video/gspca/gspca.h
@@ -118,9 +118,6 @@ struct gspca_frame {
118 struct v4l2_buffer v4l2_buf; 118 struct v4l2_buffer v4l2_buf;
119}; 119};
120 120
121/* defines for the flags member */
122#define GSPCA_SENSOR_UPSIDE_DOWN_FLAG 0x01
123
124struct gspca_dev { 121struct gspca_dev {
125 struct video_device vdev; /* !! must be the first item */ 122 struct video_device vdev; /* !! must be the first item */
126 struct file_operations fops; 123 struct file_operations fops;
@@ -166,7 +163,6 @@ struct gspca_dev {
166 char nurbs; /* number of allocated URBs */ 163 char nurbs; /* number of allocated URBs */
167 char memory; /* memory type (V4L2_MEMORY_xxx) */ 164 char memory; /* memory type (V4L2_MEMORY_xxx) */
168 __u8 nbalt; /* number of USB alternate settings */ 165 __u8 nbalt; /* number of USB alternate settings */
169 __u8 flags; /* see GSPCA_XXX_FLAG defines */
170}; 166};
171 167
172int gspca_dev_probe(struct usb_interface *intf, 168int gspca_dev_probe(struct usb_interface *intf,
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c
index f1d8c7a08ba2..79436f27cd4e 100644
--- a/drivers/media/video/gspca/zc3xx.c
+++ b/drivers/media/video/gspca/zc3xx.c
@@ -70,10 +70,6 @@ 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
77/* V4L2 controls supported by the driver */ 73/* V4L2 controls supported by the driver */
78static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val); 74static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val);
79static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val); 75static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val);
@@ -7019,8 +7015,7 @@ static int sd_config(struct gspca_dev *gspca_dev,
7019 7015
7020 /* define some sensors from the vendor/product */ 7016 /* define some sensors from the vendor/product */
7021 sd->sharpness = 2; 7017 sd->sharpness = 2;
7022 sd->sensor = DRIVER_INFO_GET_SENSOR(id->driver_info); 7018 sd->sensor = id->driver_info;
7023 gspca_dev->flags = DRIVER_INFO_GET_FLAGS(id->driver_info);
7024 sensor = zcxx_probeSensor(gspca_dev); 7019 sensor = zcxx_probeSensor(gspca_dev);
7025 if (sensor >= 0) 7020 if (sensor >= 0)
7026 PDEBUG(D_PROBE, "probe sensor -> %02x", sensor); 7021 PDEBUG(D_PROBE, "probe sensor -> %02x", sensor);
@@ -7510,19 +7505,19 @@ static const __devinitdata struct usb_device_id device_table[] = {
7510 {USB_DEVICE(0x041e, 0x041e)}, 7505 {USB_DEVICE(0x041e, 0x041e)},
7511#ifndef CONFIG_USB_ZC0301 7506#ifndef CONFIG_USB_ZC0301
7512 {USB_DEVICE(0x041e, 0x4017)}, 7507 {USB_DEVICE(0x041e, 0x4017)},
7513 {USB_DEVICE(0x041e, 0x401c), DRIVER_INFO(SENSOR_PAS106, 0)}, 7508 {USB_DEVICE(0x041e, 0x401c), .driver_info = SENSOR_PAS106},
7514 {USB_DEVICE(0x041e, 0x401e)}, 7509 {USB_DEVICE(0x041e, 0x401e)},
7515 {USB_DEVICE(0x041e, 0x401f)}, 7510 {USB_DEVICE(0x041e, 0x401f)},
7516#endif 7511#endif
7517 {USB_DEVICE(0x041e, 0x4029)}, 7512 {USB_DEVICE(0x041e, 0x4029)},
7518#ifndef CONFIG_USB_ZC0301 7513#ifndef CONFIG_USB_ZC0301
7519 {USB_DEVICE(0x041e, 0x4034), DRIVER_INFO(SENSOR_PAS106, 0)}, 7514 {USB_DEVICE(0x041e, 0x4034), .driver_info = SENSOR_PAS106},
7520 {USB_DEVICE(0x041e, 0x4035), DRIVER_INFO(SENSOR_PAS106, 0)}, 7515 {USB_DEVICE(0x041e, 0x4035), .driver_info = SENSOR_PAS106},
7521 {USB_DEVICE(0x041e, 0x4036)}, 7516 {USB_DEVICE(0x041e, 0x4036)},
7522 {USB_DEVICE(0x041e, 0x403a)}, 7517 {USB_DEVICE(0x041e, 0x403a)},
7523#endif 7518#endif
7524 {USB_DEVICE(0x041e, 0x4051), DRIVER_INFO(SENSOR_TAS5130C_VF0250, 0)}, 7519 {USB_DEVICE(0x041e, 0x4051), .driver_info = SENSOR_TAS5130C_VF0250},
7525 {USB_DEVICE(0x041e, 0x4053), DRIVER_INFO(SENSOR_TAS5130C_VF0250, 0)}, 7520 {USB_DEVICE(0x041e, 0x4053), .driver_info = SENSOR_TAS5130C_VF0250},
7526#ifndef CONFIG_USB_ZC0301 7521#ifndef CONFIG_USB_ZC0301
7527 {USB_DEVICE(0x0458, 0x7007)}, 7522 {USB_DEVICE(0x0458, 0x7007)},
7528 {USB_DEVICE(0x0458, 0x700c)}, 7523 {USB_DEVICE(0x0458, 0x700c)},
@@ -7548,13 +7543,11 @@ static const __devinitdata struct usb_device_id device_table[] = {
7548 {USB_DEVICE(0x046d, 0x08d9)}, 7543 {USB_DEVICE(0x046d, 0x08d9)},
7549 {USB_DEVICE(0x046d, 0x08d8)}, 7544 {USB_DEVICE(0x046d, 0x08d8)},
7550 {USB_DEVICE(0x046d, 0x08da)}, 7545 {USB_DEVICE(0x046d, 0x08da)},
7551 {USB_DEVICE(0x046d, 0x08dd), DRIVER_INFO(SENSOR_MC501CB, 0)}, 7546 {USB_DEVICE(0x046d, 0x08dd), .driver_info = SENSOR_MC501CB},
7552 {USB_DEVICE(0x0471, 0x0325), DRIVER_INFO(SENSOR_PAS106, 7547 {USB_DEVICE(0x0471, 0x0325), .driver_info = SENSOR_PAS106},
7553 GSPCA_SENSOR_UPSIDE_DOWN_FLAG)}, 7548 {USB_DEVICE(0x0471, 0x0326), .driver_info = SENSOR_PAS106},
7554 {USB_DEVICE(0x0471, 0x0326), DRIVER_INFO(SENSOR_PAS106, 7549 {USB_DEVICE(0x0471, 0x032d), .driver_info = SENSOR_PAS106},
7555 GSPCA_SENSOR_UPSIDE_DOWN_FLAG)}, 7550 {USB_DEVICE(0x0471, 0x032e), .driver_info = SENSOR_PAS106},
7556 {USB_DEVICE(0x0471, 0x032d), DRIVER_INFO(SENSOR_PAS106, 0)},
7557 {USB_DEVICE(0x0471, 0x032e), DRIVER_INFO(SENSOR_PAS106, 0)},
7558 {USB_DEVICE(0x055f, 0xc005)}, 7551 {USB_DEVICE(0x055f, 0xc005)},
7559#ifndef CONFIG_USB_ZC0301 7552#ifndef CONFIG_USB_ZC0301
7560 {USB_DEVICE(0x055f, 0xd003)}, 7553 {USB_DEVICE(0x055f, 0xd003)},
@@ -7566,7 +7559,7 @@ static const __devinitdata struct usb_device_id device_table[] = {
7566 {USB_DEVICE(0x0ac8, 0x301b)}, 7559 {USB_DEVICE(0x0ac8, 0x301b)},
7567 {USB_DEVICE(0x0ac8, 0x303b)}, 7560 {USB_DEVICE(0x0ac8, 0x303b)},
7568#endif 7561#endif
7569 {USB_DEVICE(0x0ac8, 0x305b), DRIVER_INFO(SENSOR_TAS5130C_VF0250, 0)}, 7562 {USB_DEVICE(0x0ac8, 0x305b), .driver_info = SENSOR_TAS5130C_VF0250},
7570#ifndef CONFIG_USB_ZC0301 7563#ifndef CONFIG_USB_ZC0301
7571 {USB_DEVICE(0x0ac8, 0x307b)}, 7564 {USB_DEVICE(0x0ac8, 0x307b)},
7572 {USB_DEVICE(0x10fd, 0x0128)}, 7565 {USB_DEVICE(0x10fd, 0x0128)},