diff options
Diffstat (limited to 'drivers/media/video/gspca/spca501.c')
-rw-r--r-- | drivers/media/video/gspca/spca501.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/drivers/media/video/gspca/spca501.c b/drivers/media/video/gspca/spca501.c index c6468cf3506a..417fbe2214be 100644 --- a/drivers/media/video/gspca/spca501.c +++ b/drivers/media/video/gspca/spca501.c | |||
@@ -23,8 +23,8 @@ | |||
23 | 23 | ||
24 | #include "gspca.h" | 24 | #include "gspca.h" |
25 | 25 | ||
26 | #define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 0) | 26 | #define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 4) |
27 | static const char version[] = "2.1.0"; | 27 | static const char version[] = "2.1.4"; |
28 | 28 | ||
29 | MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>"); | 29 | MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>"); |
30 | MODULE_DESCRIPTION("GSPCA/SPCA501 USB Camera Driver"); | 30 | MODULE_DESCRIPTION("GSPCA/SPCA501 USB Camera Driver"); |
@@ -151,7 +151,7 @@ static struct cam_mode vga_mode[] = { | |||
151 | #define SPCA501_A33 0x10 | 151 | #define SPCA501_A33 0x10 |
152 | 152 | ||
153 | /* Data for video camera initialization before capturing */ | 153 | /* Data for video camera initialization before capturing */ |
154 | static __u16 spca501_open_data[][3] = { | 154 | static const __u16 spca501_open_data[][3] = { |
155 | /* bmRequest,value,index */ | 155 | /* bmRequest,value,index */ |
156 | 156 | ||
157 | {0x2, 0x50, 0x00}, /* C/S enable soft reset */ | 157 | {0x2, 0x50, 0x00}, /* C/S enable soft reset */ |
@@ -257,7 +257,7 @@ static __u16 spca501_open_data[][3] = { | |||
257 | */ | 257 | */ |
258 | 258 | ||
259 | /* Data for chip initialization (set default values) */ | 259 | /* Data for chip initialization (set default values) */ |
260 | static __u16 spca501_init_data[][3] = { | 260 | static const __u16 spca501_init_data[][3] = { |
261 | /* Set all the values to powerup defaults */ | 261 | /* Set all the values to powerup defaults */ |
262 | /* bmRequest,value,index */ | 262 | /* bmRequest,value,index */ |
263 | {0x0, 0xAA, 0x00}, | 263 | {0x0, 0xAA, 0x00}, |
@@ -544,7 +544,7 @@ static __u16 spca501_init_data[][3] = { | |||
544 | * Capture and decoding by Colin Peart. | 544 | * Capture and decoding by Colin Peart. |
545 | * This is is for the 3com HomeConnect Lite which is spca501a based. | 545 | * This is is for the 3com HomeConnect Lite which is spca501a based. |
546 | */ | 546 | */ |
547 | static __u16 spca501_3com_open_data[][3] = { | 547 | static const __u16 spca501_3com_open_data[][3] = { |
548 | /* bmRequest,value,index */ | 548 | /* bmRequest,value,index */ |
549 | {0x2, 0x0050, 0x0000}, /* C/S Enable TG soft reset, timing mode=010 */ | 549 | {0x2, 0x0050, 0x0000}, /* C/S Enable TG soft reset, timing mode=010 */ |
550 | {0x2, 0x0043, 0x0000}, /* C/S Disable TG soft reset, timing mode=010 */ | 550 | {0x2, 0x0043, 0x0000}, /* C/S Disable TG soft reset, timing mode=010 */ |
@@ -639,7 +639,7 @@ static __u16 spca501_3com_open_data[][3] = { | |||
639 | * 2) Understand why some values seem to appear more than once | 639 | * 2) Understand why some values seem to appear more than once |
640 | * 3) Write a small comment for each line of the following arrays. | 640 | * 3) Write a small comment for each line of the following arrays. |
641 | */ | 641 | */ |
642 | static __u16 spca501c_arowana_open_data[][3] = { | 642 | static const __u16 spca501c_arowana_open_data[][3] = { |
643 | /* bmRequest,value,index */ | 643 | /* bmRequest,value,index */ |
644 | {0x02, 0x0007, 0x0005}, | 644 | {0x02, 0x0007, 0x0005}, |
645 | {0x02, 0xa048, 0x0000}, | 645 | {0x02, 0xa048, 0x0000}, |
@@ -661,7 +661,7 @@ static __u16 spca501c_arowana_open_data[][3] = { | |||
661 | {} | 661 | {} |
662 | }; | 662 | }; |
663 | 663 | ||
664 | static __u16 spca501c_arowana_init_data[][3] = { | 664 | static const __u16 spca501c_arowana_init_data[][3] = { |
665 | /* bmRequest,value,index */ | 665 | /* bmRequest,value,index */ |
666 | {0x02, 0x0007, 0x0005}, | 666 | {0x02, 0x0007, 0x0005}, |
667 | {0x02, 0xa048, 0x0000}, | 667 | {0x02, 0xa048, 0x0000}, |
@@ -1595,7 +1595,7 @@ static __u16 spca501c_arowana_init_data[][3] = { | |||
1595 | 1595 | ||
1596 | /* Unknow camera from Ori Usbid 0x0000:0x0000 */ | 1596 | /* Unknow camera from Ori Usbid 0x0000:0x0000 */ |
1597 | /* Based on snoops from Ori Cohen */ | 1597 | /* Based on snoops from Ori Cohen */ |
1598 | static __u16 spca501c_mysterious_open_data[][3] = { | 1598 | static const __u16 spca501c_mysterious_open_data[][3] = { |
1599 | {0x02, 0x000f, 0x0005}, | 1599 | {0x02, 0x000f, 0x0005}, |
1600 | {0x02, 0xa048, 0x0000}, | 1600 | {0x02, 0xa048, 0x0000}, |
1601 | {0x05, 0x0022, 0x0004}, | 1601 | {0x05, 0x0022, 0x0004}, |
@@ -1646,7 +1646,7 @@ static __u16 spca501c_mysterious_open_data[][3] = { | |||
1646 | }; | 1646 | }; |
1647 | 1647 | ||
1648 | /* Based on snoops from Ori Cohen */ | 1648 | /* Based on snoops from Ori Cohen */ |
1649 | static __u16 spca501c_mysterious_init_data[][3] = { | 1649 | static const __u16 spca501c_mysterious_init_data[][3] = { |
1650 | /* Part 3 */ | 1650 | /* Part 3 */ |
1651 | /* TG registers */ | 1651 | /* TG registers */ |
1652 | /* {0x00, 0x0000, 0x0000}, */ | 1652 | /* {0x00, 0x0000, 0x0000}, */ |
@@ -1839,7 +1839,7 @@ static int reg_read(struct usb_device *dev, | |||
1839 | } | 1839 | } |
1840 | 1840 | ||
1841 | static int write_vector(struct gspca_dev *gspca_dev, | 1841 | static int write_vector(struct gspca_dev *gspca_dev, |
1842 | __u16 data[][3]) | 1842 | const __u16 data[][3]) |
1843 | { | 1843 | { |
1844 | struct usb_device *dev = gspca_dev->dev; | 1844 | struct usb_device *dev = gspca_dev->dev; |
1845 | int ret, i = 0; | 1845 | int ret, i = 0; |
@@ -2001,7 +2001,6 @@ static int sd_open(struct gspca_dev *gspca_dev) | |||
2001 | { | 2001 | { |
2002 | struct sd *sd = (struct sd *) gspca_dev; | 2002 | struct sd *sd = (struct sd *) gspca_dev; |
2003 | 2003 | ||
2004 | PDEBUG(D_STREAM, "SPCA501 init"); | ||
2005 | switch (sd->subtype) { | 2004 | switch (sd->subtype) { |
2006 | case ThreeComHomeConnectLite: | 2005 | case ThreeComHomeConnectLite: |
2007 | /* Special handling for 3com data */ | 2006 | /* Special handling for 3com data */ |
@@ -2050,7 +2049,7 @@ static void sd_start(struct gspca_dev *gspca_dev) | |||
2050 | reg_write(dev, SPCA501_REG_CTLRL, 0x01, 0x02); | 2049 | reg_write(dev, SPCA501_REG_CTLRL, 0x01, 0x02); |
2051 | 2050 | ||
2052 | /* HDG atleast the Intel CreateAndShare needs to have one of its | 2051 | /* HDG atleast the Intel CreateAndShare needs to have one of its |
2053 | * brightness / contrast / color set otherwise it assumes wath seems | 2052 | * brightness / contrast / color set otherwise it assumes what seems |
2054 | * max contrast. Note that strange enough setting any of these is | 2053 | * max contrast. Note that strange enough setting any of these is |
2055 | * enough to fix the max contrast problem, to be sure we set all 3 */ | 2054 | * enough to fix the max contrast problem, to be sure we set all 3 */ |
2056 | setbrightness(gspca_dev); | 2055 | setbrightness(gspca_dev); |
@@ -2159,7 +2158,7 @@ static int sd_getcolors(struct gspca_dev *gspca_dev, __s32 *val) | |||
2159 | } | 2158 | } |
2160 | 2159 | ||
2161 | /* sub-driver description */ | 2160 | /* sub-driver description */ |
2162 | static struct sd_desc sd_desc = { | 2161 | static const struct sd_desc sd_desc = { |
2163 | .name = MODULE_NAME, | 2162 | .name = MODULE_NAME, |
2164 | .ctrls = sd_ctrls, | 2163 | .ctrls = sd_ctrls, |
2165 | .nctrls = ARRAY_SIZE(sd_ctrls), | 2164 | .nctrls = ARRAY_SIZE(sd_ctrls), |
@@ -2174,7 +2173,7 @@ static struct sd_desc sd_desc = { | |||
2174 | 2173 | ||
2175 | /* -- module initialisation -- */ | 2174 | /* -- module initialisation -- */ |
2176 | #define DVNM(name) .driver_info = (kernel_ulong_t) name | 2175 | #define DVNM(name) .driver_info = (kernel_ulong_t) name |
2177 | static __devinitdata struct usb_device_id device_table[] = { | 2176 | static const __devinitdata struct usb_device_id device_table[] = { |
2178 | {USB_DEVICE(0x040a, 0x0002), DVNM("Kodak DVC-325")}, | 2177 | {USB_DEVICE(0x040a, 0x0002), DVNM("Kodak DVC-325")}, |
2179 | {USB_DEVICE(0x0497, 0xc001), DVNM("Smile International")}, | 2178 | {USB_DEVICE(0x0497, 0xc001), DVNM("Smile International")}, |
2180 | {USB_DEVICE(0x0506, 0x00df), DVNM("3Com HomeConnect Lite")}, | 2179 | {USB_DEVICE(0x0506, 0x00df), DVNM("3Com HomeConnect Lite")}, |