V4L/DVB (13899): gspca - all subdrivers: Make control descriptors constant.
The ctrls field of struct sd_desc is declared as const in gspca.h. It is worth to initialize the content also with constant values. Signed-off-by: Marton Nemeth <nm127@freemail.hu> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
aabcdfb65b
commit
7e64dc4c4d
|
@ -32,7 +32,7 @@ struct sd {
|
|||
};
|
||||
|
||||
/* V4L2 controls supported by the driver */
|
||||
static struct ctrl sd_ctrls[] = {
|
||||
static const struct ctrl sd_ctrls[] = {
|
||||
};
|
||||
|
||||
static const struct v4l2_pix_format vga_mode[] = {
|
||||
|
|
|
@ -52,7 +52,7 @@ static int sd_getcontrast(struct gspca_dev *gspca_dev, __s32 *val);
|
|||
static int sd_setcolors(struct gspca_dev *gspca_dev, __s32 val);
|
||||
static int sd_getcolors(struct gspca_dev *gspca_dev, __s32 *val);
|
||||
|
||||
static struct ctrl sd_ctrls[] = {
|
||||
static const struct ctrl sd_ctrls[] = {
|
||||
{
|
||||
{
|
||||
.id = V4L2_CID_BRIGHTNESS,
|
||||
|
|
|
@ -52,7 +52,7 @@ static int sd_getcolors(struct gspca_dev *gspca_dev, __s32 *val);
|
|||
static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val);
|
||||
static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val);
|
||||
|
||||
static struct ctrl sd_ctrls[] = {
|
||||
static const struct ctrl sd_ctrls[] = {
|
||||
{
|
||||
{
|
||||
.id = V4L2_CID_BRIGHTNESS,
|
||||
|
|
|
@ -54,7 +54,7 @@ static int sd_getgamma(struct gspca_dev *gspca_dev, __s32 *val);
|
|||
static int sd_setsharpness(struct gspca_dev *gspca_dev, __s32 val);
|
||||
static int sd_getsharpness(struct gspca_dev *gspca_dev, __s32 *val);
|
||||
|
||||
static struct ctrl sd_ctrls[] = {
|
||||
static const struct ctrl sd_ctrls[] = {
|
||||
{
|
||||
{
|
||||
.id = V4L2_CID_BRIGHTNESS,
|
||||
|
|
|
@ -107,7 +107,7 @@ static void setexposure(struct gspca_dev *gspca_dev);
|
|||
static void setgain(struct gspca_dev *gspca_dev);
|
||||
|
||||
/* V4L2 controls supported by the driver */
|
||||
static struct ctrl sd_ctrls[] = {
|
||||
static const struct ctrl sd_ctrls[] = {
|
||||
/* Separate brightness control description for Argus QuickClix as it has
|
||||
different limits from the other mr97310a cameras */
|
||||
{
|
||||
|
|
|
@ -106,7 +106,7 @@ static int sd_getsatur(struct gspca_dev *gspca_dev, __s32 *val);
|
|||
static int sd_setfreq(struct gspca_dev *gspca_dev, __s32 val);
|
||||
static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val);
|
||||
|
||||
static struct ctrl sd_ctrls_ov772x[] = {
|
||||
static const struct ctrl sd_ctrls_ov772x[] = {
|
||||
{ /* 0 */
|
||||
{
|
||||
.id = V4L2_CID_BRIGHTNESS,
|
||||
|
@ -277,7 +277,7 @@ static struct ctrl sd_ctrls_ov772x[] = {
|
|||
.get = sd_getvflip,
|
||||
},
|
||||
};
|
||||
static struct ctrl sd_ctrls_ov965x[] = {
|
||||
static const struct ctrl sd_ctrls_ov965x[] = {
|
||||
{ /* 0 */
|
||||
{
|
||||
.id = V4L2_CID_BRIGHTNESS,
|
||||
|
|
|
@ -77,7 +77,7 @@ static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val);
|
|||
static int sd_setgain(struct gspca_dev *gspca_dev, __s32 val);
|
||||
static int sd_getgain(struct gspca_dev *gspca_dev, __s32 *val);
|
||||
|
||||
static struct ctrl sd_ctrls[] = {
|
||||
static const struct ctrl sd_ctrls[] = {
|
||||
#define SD_BRIGHTNESS 0
|
||||
{
|
||||
{
|
||||
|
|
|
@ -124,7 +124,7 @@ static int sd_getgain(struct gspca_dev *gspca_dev, __s32 *val);
|
|||
static int sd_setexposure(struct gspca_dev *gspca_dev, __s32 val);
|
||||
static int sd_getexposure(struct gspca_dev *gspca_dev, __s32 *val);
|
||||
|
||||
static struct ctrl sd_ctrls[] = {
|
||||
static const struct ctrl sd_ctrls[] = {
|
||||
/* This control is pac7302 only */
|
||||
{
|
||||
{
|
||||
|
|
|
@ -88,7 +88,7 @@ static int sd_getgain(struct gspca_dev *gspca_dev, __s32 *val);
|
|||
static int sd_setexposure(struct gspca_dev *gspca_dev, __s32 val);
|
||||
static int sd_getexposure(struct gspca_dev *gspca_dev, __s32 *val);
|
||||
|
||||
static struct ctrl sd_ctrls[] = {
|
||||
static const struct ctrl sd_ctrls[] = {
|
||||
/* This control is for both the 7302 and the 7311 */
|
||||
{
|
||||
{
|
||||
|
|
|
@ -129,7 +129,7 @@ static int sd_getexposure(struct gspca_dev *gspca_dev, s32 *val);
|
|||
static int sd_setautoexposure(struct gspca_dev *gspca_dev, s32 val);
|
||||
static int sd_getautoexposure(struct gspca_dev *gspca_dev, s32 *val);
|
||||
|
||||
static struct ctrl sd_ctrls[] = {
|
||||
static const struct ctrl sd_ctrls[] = {
|
||||
{
|
||||
#define BRIGHTNESS_IDX 0
|
||||
{
|
||||
|
|
|
@ -145,7 +145,7 @@ static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val);
|
|||
static int sd_setfreq(struct gspca_dev *gspca_dev, __s32 val);
|
||||
static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val);
|
||||
|
||||
static struct ctrl sd_ctrls[] = {
|
||||
static const struct ctrl sd_ctrls[] = {
|
||||
#define BRIGHTNESS_IDX 0
|
||||
{
|
||||
{
|
||||
|
|
|
@ -105,7 +105,7 @@ static int sd_getinfrared(struct gspca_dev *gspca_dev, __s32 *val);
|
|||
static int sd_setfreq(struct gspca_dev *gspca_dev, __s32 val);
|
||||
static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val);
|
||||
|
||||
static struct ctrl sd_ctrls[] = {
|
||||
static const struct ctrl sd_ctrls[] = {
|
||||
#define BRIGHTNESS_IDX 0
|
||||
{
|
||||
{
|
||||
|
|
|
@ -68,7 +68,7 @@ static int sd_getcontrast(struct gspca_dev *gspca_dev, __s32 *val);
|
|||
static int sd_setcolors(struct gspca_dev *gspca_dev, __s32 val);
|
||||
static int sd_getcolors(struct gspca_dev *gspca_dev, __s32 *val);
|
||||
|
||||
static struct ctrl sd_ctrls[] = {
|
||||
static const struct ctrl sd_ctrls[] = {
|
||||
{
|
||||
{
|
||||
.id = V4L2_CID_BRIGHTNESS,
|
||||
|
|
|
@ -59,7 +59,7 @@ static int sd_getblue_balance(struct gspca_dev *gspca_dev, __s32 *val);
|
|||
static int sd_setred_balance(struct gspca_dev *gspca_dev, __s32 val);
|
||||
static int sd_getred_balance(struct gspca_dev *gspca_dev, __s32 *val);
|
||||
|
||||
static struct ctrl sd_ctrls[] = {
|
||||
static const struct ctrl sd_ctrls[] = {
|
||||
#define MY_BRIGHTNESS 0
|
||||
{
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@ struct sd {
|
|||
static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val);
|
||||
static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val);
|
||||
|
||||
static struct ctrl sd_ctrls[] = {
|
||||
static const struct ctrl sd_ctrls[] = {
|
||||
{
|
||||
{
|
||||
.id = V4L2_CID_BRIGHTNESS,
|
||||
|
|
|
@ -51,7 +51,7 @@ static int sd_getcolors(struct gspca_dev *gspca_dev, __s32 *val);
|
|||
static int sd_sethue(struct gspca_dev *gspca_dev, __s32 val);
|
||||
static int sd_gethue(struct gspca_dev *gspca_dev, __s32 *val);
|
||||
|
||||
static struct ctrl sd_ctrls[] = {
|
||||
static const struct ctrl sd_ctrls[] = {
|
||||
#define SD_BRIGHTNESS 0
|
||||
{
|
||||
{
|
||||
|
|
|
@ -45,7 +45,7 @@ struct sd {
|
|||
static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val);
|
||||
static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val);
|
||||
|
||||
static struct ctrl sd_ctrls[] = {
|
||||
static const struct ctrl sd_ctrls[] = {
|
||||
{
|
||||
{
|
||||
.id = V4L2_CID_BRIGHTNESS,
|
||||
|
|
|
@ -922,7 +922,7 @@ static int sd_getgain(struct gspca_dev *gspca_dev, __s32 *val)
|
|||
}
|
||||
|
||||
/* control tables */
|
||||
static struct ctrl sd_ctrls_12a[] = {
|
||||
static const struct ctrl sd_ctrls_12a[] = {
|
||||
{
|
||||
{
|
||||
.id = V4L2_CID_HUE,
|
||||
|
@ -964,7 +964,7 @@ static struct ctrl sd_ctrls_12a[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct ctrl sd_ctrls_72a[] = {
|
||||
static const struct ctrl sd_ctrls_72a[] = {
|
||||
{
|
||||
{
|
||||
.id = V4L2_CID_HUE,
|
||||
|
|
|
@ -53,7 +53,7 @@ static int sd_getcolors(struct gspca_dev *gspca_dev, __s32 *val);
|
|||
static int sd_setfreq(struct gspca_dev *gspca_dev, __s32 val);
|
||||
static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val);
|
||||
|
||||
static struct ctrl sd_ctrls[] = {
|
||||
static const struct ctrl sd_ctrls[] = {
|
||||
{
|
||||
{
|
||||
.id = V4L2_CID_BRIGHTNESS,
|
||||
|
|
|
@ -45,7 +45,7 @@ struct sd {
|
|||
};
|
||||
|
||||
/* V4L2 controls supported by the driver */
|
||||
static struct ctrl sd_ctrls[] = {
|
||||
static const struct ctrl sd_ctrls[] = {
|
||||
};
|
||||
|
||||
static int stv_sndctrl(struct gspca_dev *gspca_dev, int set, u8 req, u16 val,
|
||||
|
|
|
@ -67,7 +67,7 @@ static int sd_getcolors(struct gspca_dev *gspca_dev, __s32 *val);
|
|||
static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val);
|
||||
static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val);
|
||||
|
||||
static struct ctrl sd_ctrls[] = {
|
||||
static const struct ctrl sd_ctrls[] = {
|
||||
{
|
||||
{
|
||||
.id = V4L2_CID_BRIGHTNESS,
|
||||
|
|
|
@ -78,7 +78,7 @@ static int sd_geteffect(struct gspca_dev *gspca_dev, __s32 *val);
|
|||
static int sd_querymenu(struct gspca_dev *gspca_dev,
|
||||
struct v4l2_querymenu *menu);
|
||||
|
||||
static struct ctrl sd_ctrls[] = {
|
||||
static const struct ctrl sd_ctrls[] = {
|
||||
{
|
||||
{
|
||||
.id = V4L2_CID_BRIGHTNESS,
|
||||
|
|
|
@ -39,7 +39,7 @@ struct sd {
|
|||
static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val);
|
||||
static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val);
|
||||
|
||||
static struct ctrl sd_ctrls[] = {
|
||||
static const struct ctrl sd_ctrls[] = {
|
||||
{
|
||||
{
|
||||
.id = V4L2_CID_BRIGHTNESS,
|
||||
|
|
|
@ -78,7 +78,7 @@ static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val);
|
|||
static int sd_setsharpness(struct gspca_dev *gspca_dev, __s32 val);
|
||||
static int sd_getsharpness(struct gspca_dev *gspca_dev, __s32 *val);
|
||||
|
||||
static struct ctrl sd_ctrls[] = {
|
||||
static const struct ctrl sd_ctrls[] = {
|
||||
#define BRIGHTNESS_IDX 0
|
||||
{
|
||||
{
|
||||
|
|
|
@ -92,7 +92,7 @@ static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val);
|
|||
static int sd_setsharpness(struct gspca_dev *gspca_dev, __s32 val);
|
||||
static int sd_getsharpness(struct gspca_dev *gspca_dev, __s32 *val);
|
||||
|
||||
static struct ctrl sd_ctrls[] = {
|
||||
static const struct ctrl sd_ctrls[] = {
|
||||
#define BRIGHTNESS_IDX 0
|
||||
#define SD_BRIGHTNESS 0
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue