From a5ae2062252e697d38e53dbbeb91460252208914 Mon Sep 17 00:00:00 2001 From: Jean-Francois Moine Date: Fri, 4 Jul 2008 11:16:16 -0300 Subject: V4L/DVB (8195): gspca: Input buffer overwritten in spca561 + cleanup code. spca561: Input buffer may be changed on reg write. (all sd): Cleanup code, 'const' added. Signed-off-by: Jean-Francois Moine Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/gspca/mars.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'drivers/media/video/gspca/mars.c') diff --git a/drivers/media/video/gspca/mars.c b/drivers/media/video/gspca/mars.c index 6556e0a330f..c70ccc8fe68 100644 --- a/drivers/media/video/gspca/mars.c +++ b/drivers/media/video/gspca/mars.c @@ -24,8 +24,8 @@ #include "gspca.h" #include "jpeg.h" -#define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 0) -static const char version[] = "2.1.0"; +#define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 4) +static const char version[] = "2.1.4"; MODULE_AUTHOR("Michel Xhaard "); MODULE_DESCRIPTION("GSPCA/Mars USB Camera Driver"); @@ -140,7 +140,8 @@ static void sd_start(struct gspca_dev *gspca_dev) __u16 MI_buf[242]; int h_size, v_size; int intpipe; - /* struct usb_device *dev = pcam->dev; */ +/* struct usb_device *dev = pcam->dev; */ + memset(data, 0, sizeof data); memset(MI_buf, 0, sizeof MI_buf); @@ -351,7 +352,7 @@ static void sd_close(struct gspca_dev *gspca_dev) static void sd_pkt_scan(struct gspca_dev *gspca_dev, struct gspca_frame *frame, /* target */ - unsigned char *data, /* isoc packet */ + __u8 *data, /* isoc packet */ int len) /* iso packet length */ { struct sd *sd = (struct sd *) gspca_dev; @@ -389,7 +390,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, } /* sub-driver description */ -static struct sd_desc sd_desc = { +static const struct sd_desc sd_desc = { .name = MODULE_NAME, .ctrls = sd_ctrls, .nctrls = ARRAY_SIZE(sd_ctrls), @@ -404,7 +405,7 @@ static struct sd_desc sd_desc = { /* -- module initialisation -- */ #define DVNM(name) .driver_info = (kernel_ulong_t) name -static __devinitdata struct usb_device_id device_table[] = { +static const __devinitdata struct usb_device_id device_table[] = { {USB_DEVICE(0x093a, 0x050f), DVNM("Mars-Semi Pc-Camera")}, {} }; -- cgit v1.2.3-70-g09d2