summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/pac207.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-07-05 16:49:20 +0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-20 12:17:15 +0200
commitc2446b3eba97243acbe2ad0939a28b5edb97eae7 (patch)
treef7ff764cf48062c4ef7c243205b85ae73d69763e /drivers/media/video/gspca/pac207.c
parentV4L/DVB (8199): gspca: Compile warnings about NULL ptr. (diff)
downloadlinux-c2446b3eba97243acbe2ad0939a28b5edb97eae7.tar.xz
linux-c2446b3eba97243acbe2ad0939a28b5edb97eae7.zip
V4L/DVB (8201): gspca: v4l2_pix_format in each subdriver.
main: Parameter comp_fac removed. main, pac207: get_buff_size op removed. (all) v4l2_pix_format in each subdriver. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/gspca/pac207.c')
-rw-r--r--drivers/media/video/gspca/pac207.c33
1 files changed, 14 insertions, 19 deletions
diff --git a/drivers/media/video/gspca/pac207.c b/drivers/media/video/gspca/pac207.c
index ab83d7b69348..b580af92d231 100644
--- a/drivers/media/video/gspca/pac207.c
+++ b/drivers/media/video/gspca/pac207.c
@@ -27,8 +27,8 @@
#include "gspca.h"
-#define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 4)
-static const char version[] = "2.1.4";
+#define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 5)
+static const char version[] = "2.1.5";
MODULE_AUTHOR("Hans de Goede <j.w.r.degoede@hhs.nl>");
MODULE_DESCRIPTION("Pixart PAC207");
@@ -157,9 +157,18 @@ static struct ctrl sd_ctrls[] = {
},
};
-static struct cam_mode sif_mode[] = {
- {V4L2_PIX_FMT_PAC207, 176, 144, 1},
- {V4L2_PIX_FMT_PAC207, 352, 288, 0},
+static struct v4l2_pix_format sif_mode[] = {
+ {176, 144, V4L2_PIX_FMT_PAC207, V4L2_FIELD_NONE,
+ .bytesperline = 176,
+ .sizeimage = (176 + 2) * 144,
+ /* uncompressed, add 2 bytes / line for line header */
+ .colorspace = V4L2_COLORSPACE_SRGB,
+ .priv = 1},
+ {352, 288, V4L2_PIX_FMT_PAC207, V4L2_FIELD_NONE,
+ .bytesperline = 352,
+ .sizeimage = 352 * 288 / 2, /* compressed */
+ .colorspace = V4L2_COLORSPACE_SRGB,
+ .priv = 0},
};
static const __u8 pac207_sensor_init[][8] = {
@@ -346,19 +355,6 @@ static void sd_close(struct gspca_dev *gspca_dev)
{
}
-static int sd_get_buff_size_op(struct gspca_dev *gspca_dev, int mode)
-{
- switch (gspca_dev->cam.cam_mode[mode].width) {
- case 176: /* 176x144 */
- /* uncompressed, add 2 bytes / line for line header */
- return (176 + 2) * 144;
- case 352: /* 352x288 */
- /* compressed */
- return 352 * 288 / 2;
- }
- return -EIO; /* should never happen */
-}
-
/* auto gain and exposure algorithm based on the knee algorithm described here:
* <http://ytse.tricolour.net/docs/LowLightOptimization.html> */
static void pac207_do_auto_gain(struct gspca_dev *gspca_dev)
@@ -632,7 +628,6 @@ static const struct sd_desc sd_desc = {
.close = sd_close,
.dq_callback = pac207_do_auto_gain,
.pkt_scan = sd_pkt_scan,
- .get_buff_size = sd_get_buff_size_op,
};
/* -- module initialisation -- */