summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/gspca/spca508.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-07-04 13:16:16 +0200
committerJean-Francois Moine <moinejf@free.fr>2008-07-04 13:16:16 +0200
commitf1bffcf247db344598f535295d108e85b0ee15f4 (patch)
tree4f027b3e5c55c49fa8a139bb859cf187e4d6d26e /linux/drivers/media/video/gspca/spca508.c
parent7351f3bd89a0d621d0582d8836e04879f58bb68a (diff)
downloadmediapointer-dvb-s2-f1bffcf247db344598f535295d108e85b0ee15f4.tar.gz
mediapointer-dvb-s2-f1bffcf247db344598f535295d108e85b0ee15f4.tar.bz2
gspca: Input buffer overwritten in spca561 + cleanup code.
From: Jean-Francois Moine <moinejf@free.fr> spca561: Input buffer may be changed on reg write. (all sd): Cleanup code, 'const' added. Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Diffstat (limited to 'linux/drivers/media/video/gspca/spca508.c')
-rw-r--r--linux/drivers/media/video/gspca/spca508.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/linux/drivers/media/video/gspca/spca508.c b/linux/drivers/media/video/gspca/spca508.c
index 0b8190ef6..f3309e40f 100644
--- a/linux/drivers/media/video/gspca/spca508.c
+++ b/linux/drivers/media/video/gspca/spca508.c
@@ -22,8 +22,8 @@
#include "gspca.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 <mxhaard@users.sourceforge.net>");
MODULE_DESCRIPTION("GSPCA/SPCA508 USB Camera Driver");
@@ -92,7 +92,7 @@ static struct cam_mode sif_mode[] = {
* Initialization data: this is the first set-up data written to the
* device (before the open data).
*/
-static __u16 spca508_init_data[][3] =
+static const __u16 spca508_init_data[][3] =
#define IGN(x) /* nothing */
{
/* line URB value, index */
@@ -611,7 +611,7 @@ static __u16 spca508_init_data[][3] =
/*
* Data to initialize the camera using the internal CCD
*/
-static __u16 spca508_open_data[][3] = {
+static const __u16 spca508_open_data[][3] = {
/* line bmRequest,value,index */
{0, 0}
};
@@ -620,7 +620,7 @@ static __u16 spca508_open_data[][3] = {
/*
* Initialization data for Intel EasyPC Camera CS110
*/
-static __u16 spca508cs110_init_data[][3] = {
+static const __u16 spca508cs110_init_data[][3] = {
{0x0000, 0x870b}, /* Reset CTL3 */
{0x0003, 0x8111}, /* Soft Reset compression, memory, TG & CDSP */
{0x0000, 0x8111}, /* Normal operation on reset */
@@ -704,7 +704,7 @@ static __u16 spca508cs110_init_data[][3] = {
{}
};
-static __u16 spca508_sightcam_init_data[][3] = {
+static const __u16 spca508_sightcam_init_data[][3] = {
/* This line seems to setup the frame/canvas */
/*368 */ {0x000f, 0x8402},
@@ -788,7 +788,7 @@ static __u16 spca508_sightcam_init_data[][3] = {
{0, 0}
};
-static __u16 spca508_sightcam2_init_data[][3] = {
+static const __u16 spca508_sightcam2_init_data[][3] = {
#if 1
/* 35 */ {0x0020, 0x8112},
@@ -1137,7 +1137,7 @@ static __u16 spca508_sightcam2_init_data[][3] = {
/*
* Initialization data for Creative Webcam Vista
*/
-static __u16 spca508_vista_init_data[][3] = {
+static const __u16 spca508_vista_init_data[][3] = {
{0x0008, 0x8200}, /* Clear register */
{0x0000, 0x870b}, /* Reset CTL3 */
{0x0020, 0x8112}, /* Video Drop packet enable */
@@ -1479,7 +1479,7 @@ static int reg_read(struct usb_device *dev,
}
static int write_vector(struct gspca_dev *gspca_dev,
- __u16 data[][3])
+ const __u16 data[][3])
{
struct usb_device *dev = gspca_dev->dev;
int ret, i = 0;
@@ -1675,7 +1675,7 @@ static void yuvy_decode(unsigned char *out,
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;
@@ -1753,7 +1753,7 @@ static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val)
}
/* 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),
@@ -1768,7 +1768,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(0x041e, 0x4018), DVNM("Creative Webcam Vista (PD1100)")},
{USB_DEVICE(0x0461, 0x0815), DVNM("Micro Innovation IC200")},
{USB_DEVICE(0x0733, 0x0110), DVNM("ViewQuest VQ110")},