]> err.no Git - linux-2.6/commitdiff
V4L/DVB (8809): gspca: Revert commit 9a9335776548d01525141c6e8f0c12e86bbde982
authorHans de Goede <j.w.r.degoede@hhs.nl>
Wed, 3 Sep 2008 20:12:13 +0000 (17:12 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 3 Sep 2008 21:37:22 +0000 (18:37 -0300)
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>
drivers/media/video/gspca/gspca.c
drivers/media/video/gspca/gspca.h
drivers/media/video/gspca/zc3xx.c
include/linux/videodev2.h

index 0b292ca0c0802594d9d855049755985505b4eb6d..bffddf5277591232b439121cbc6eb1cbe6f40e08 100644 (file)
@@ -851,8 +851,6 @@ static int vidioc_querycap(struct file *file, void  *priv,
        cap->capabilities = V4L2_CAP_VIDEO_CAPTURE
                          | V4L2_CAP_STREAMING
                          | V4L2_CAP_READWRITE;
-       if (gspca_dev->flags & GSPCA_SENSOR_UPSIDE_DOWN_FLAG)
-               cap->capabilities |= V4L2_CAP_SENSOR_UPSIDE_DOWN;
        return 0;
 }
 
index 1920c99d6f4a49f5666a7c32de9dcbb05d26f5aa..2596568e82fd1916e0e306bcbb1a24576b572c24 100644 (file)
@@ -118,9 +118,6 @@ struct gspca_frame {
        struct v4l2_buffer v4l2_buf;
 };
 
-/* defines for the flags member */
-#define GSPCA_SENSOR_UPSIDE_DOWN_FLAG 0x01
-
 struct gspca_dev {
        struct video_device vdev;       /* !! must be the first item */
        struct file_operations fops;
@@ -166,7 +163,6 @@ struct gspca_dev {
        char nurbs;                     /* number of allocated URBs */
        char memory;                    /* memory type (V4L2_MEMORY_xxx) */
        __u8 nbalt;                     /* number of USB alternate settings */
-       __u8 flags;                     /* see GSPCA_XXX_FLAG defines */
 };
 
 int gspca_dev_probe(struct usb_interface *intf,
index f1d8c7a08ba26870f10ded7333aa625f5af2eb91..79436f27cd4ec0368b6ccdd0d421b70f62c93eee 100644 (file)
@@ -70,10 +70,6 @@ struct sd {
        unsigned short chip_revision;
 };
 
-#define DRIVER_INFO(sensor, flags) .driver_info = ((sensor) << 8) | (flags)
-#define DRIVER_INFO_GET_SENSOR(driver_info) ((driver_info) >> 8)
-#define DRIVER_INFO_GET_FLAGS(driver_info)  ((driver_info) & 0xff)
-
 /* V4L2 controls supported by the driver */
 static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val);
@@ -7019,8 +7015,7 @@ static int sd_config(struct gspca_dev *gspca_dev,
 
        /* define some sensors from the vendor/product */
        sd->sharpness = 2;
-       sd->sensor = DRIVER_INFO_GET_SENSOR(id->driver_info);
-       gspca_dev->flags = DRIVER_INFO_GET_FLAGS(id->driver_info);
+       sd->sensor = id->driver_info;
        sensor = zcxx_probeSensor(gspca_dev);
        if (sensor >= 0)
                PDEBUG(D_PROBE, "probe sensor -> %02x", sensor);
@@ -7510,19 +7505,19 @@ static const __devinitdata struct usb_device_id device_table[] = {
        {USB_DEVICE(0x041e, 0x041e)},
 #ifndef CONFIG_USB_ZC0301
        {USB_DEVICE(0x041e, 0x4017)},
-       {USB_DEVICE(0x041e, 0x401c), DRIVER_INFO(SENSOR_PAS106, 0)},
+       {USB_DEVICE(0x041e, 0x401c), .driver_info = SENSOR_PAS106},
        {USB_DEVICE(0x041e, 0x401e)},
        {USB_DEVICE(0x041e, 0x401f)},
 #endif
        {USB_DEVICE(0x041e, 0x4029)},
 #ifndef CONFIG_USB_ZC0301
-       {USB_DEVICE(0x041e, 0x4034), DRIVER_INFO(SENSOR_PAS106, 0)},
-       {USB_DEVICE(0x041e, 0x4035), DRIVER_INFO(SENSOR_PAS106, 0)},
+       {USB_DEVICE(0x041e, 0x4034), .driver_info = SENSOR_PAS106},
+       {USB_DEVICE(0x041e, 0x4035), .driver_info = SENSOR_PAS106},
        {USB_DEVICE(0x041e, 0x4036)},
        {USB_DEVICE(0x041e, 0x403a)},
 #endif
-       {USB_DEVICE(0x041e, 0x4051), DRIVER_INFO(SENSOR_TAS5130C_VF0250, 0)},
-       {USB_DEVICE(0x041e, 0x4053), DRIVER_INFO(SENSOR_TAS5130C_VF0250, 0)},
+       {USB_DEVICE(0x041e, 0x4051), .driver_info = SENSOR_TAS5130C_VF0250},
+       {USB_DEVICE(0x041e, 0x4053), .driver_info = SENSOR_TAS5130C_VF0250},
 #ifndef CONFIG_USB_ZC0301
        {USB_DEVICE(0x0458, 0x7007)},
        {USB_DEVICE(0x0458, 0x700c)},
@@ -7548,13 +7543,11 @@ static const __devinitdata struct usb_device_id device_table[] = {
        {USB_DEVICE(0x046d, 0x08d9)},
        {USB_DEVICE(0x046d, 0x08d8)},
        {USB_DEVICE(0x046d, 0x08da)},
-       {USB_DEVICE(0x046d, 0x08dd), DRIVER_INFO(SENSOR_MC501CB, 0)},
-       {USB_DEVICE(0x0471, 0x0325), DRIVER_INFO(SENSOR_PAS106,
-               GSPCA_SENSOR_UPSIDE_DOWN_FLAG)},
-       {USB_DEVICE(0x0471, 0x0326), DRIVER_INFO(SENSOR_PAS106,
-               GSPCA_SENSOR_UPSIDE_DOWN_FLAG)},
-       {USB_DEVICE(0x0471, 0x032d), DRIVER_INFO(SENSOR_PAS106, 0)},
-       {USB_DEVICE(0x0471, 0x032e), DRIVER_INFO(SENSOR_PAS106, 0)},
+       {USB_DEVICE(0x046d, 0x08dd), .driver_info = SENSOR_MC501CB},
+       {USB_DEVICE(0x0471, 0x0325), .driver_info = SENSOR_PAS106},
+       {USB_DEVICE(0x0471, 0x0326), .driver_info = SENSOR_PAS106},
+       {USB_DEVICE(0x0471, 0x032d), .driver_info = SENSOR_PAS106},
+       {USB_DEVICE(0x0471, 0x032e), .driver_info = SENSOR_PAS106},
        {USB_DEVICE(0x055f, 0xc005)},
 #ifndef CONFIG_USB_ZC0301
        {USB_DEVICE(0x055f, 0xd003)},
@@ -7566,7 +7559,7 @@ static const __devinitdata struct usb_device_id device_table[] = {
        {USB_DEVICE(0x0ac8, 0x301b)},
        {USB_DEVICE(0x0ac8, 0x303b)},
 #endif
-       {USB_DEVICE(0x0ac8, 0x305b), DRIVER_INFO(SENSOR_TAS5130C_VF0250, 0)},
+       {USB_DEVICE(0x0ac8, 0x305b), .driver_info = SENSOR_TAS5130C_VF0250},
 #ifndef CONFIG_USB_ZC0301
        {USB_DEVICE(0x0ac8, 0x307b)},
        {USB_DEVICE(0x10fd, 0x0128)},
index 4c30655b293f5d19bb5118e3ffe0d9e47d21976d..6c73516b74c40795ad5cd8a922b2235e01c9c859 100644 (file)
@@ -261,11 +261,6 @@ struct v4l2_capability {
 #define V4L2_CAP_ASYNCIO                0x02000000  /* async I/O */
 #define V4L2_CAP_STREAMING              0x04000000  /* streaming I/O ioctls */
 
-/* This flags gets set if the "sensor" is known to be upside down and this can
-   *not* be fixed using v4l2 flipx/y controls. Note that absence of this flag
-   is not a guarantee for the image not being upside down. */
-#define V4L2_CAP_SENSOR_UPSIDE_DOWN     0x10000000
-
 /*
  *     V I D E O   I M A G E   F O R M A T
  */