V4L/DVB (13898): gspca - some subdrivers: Make sd_desc const.

The function callbacks in sd_desc are defined at compile time and
they do not change at runtime. Make the sd_desc initializations const.

Signed-off-by: Márton Németh <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:
Márton Németh 2010-01-05 12:39:02 -03:00 committed by Mauro Carvalho Chehab
parent 52a9d3ef00
commit aabcdfb65b
7 changed files with 11 additions and 11 deletions

View File

@ -1032,7 +1032,7 @@ static int sd_get_jcomp(struct gspca_dev *gspca_dev,
} }
/* sub-driver description */ /* sub-driver description */
static struct sd_desc sd_desc = { static const struct sd_desc sd_desc = {
.name = MODULE_NAME, .name = MODULE_NAME,
.ctrls = sd_ctrls, .ctrls = sd_ctrls,
.nctrls = ARRAY_SIZE(sd_ctrls), .nctrls = ARRAY_SIZE(sd_ctrls),

View File

@ -851,7 +851,7 @@ static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val)
} }
/* sub-driver description */ /* sub-driver description */
static struct sd_desc sd_desc = { static const struct sd_desc sd_desc = {
.name = MODULE_NAME, .name = MODULE_NAME,
.ctrls = sd_ctrls, .ctrls = sd_ctrls,
.nctrls = ARRAY_SIZE(sd_ctrls), .nctrls = ARRAY_SIZE(sd_ctrls),

View File

@ -161,7 +161,7 @@ static int gl860_build_control_table(struct gspca_dev *gspca_dev)
/*==================== sud-driver structure initialisation =================*/ /*==================== sud-driver structure initialisation =================*/
static struct sd_desc sd_desc_mi1320 = { static const struct sd_desc sd_desc_mi1320 = {
.name = MODULE_NAME, .name = MODULE_NAME,
.ctrls = sd_ctrls_mi1320, .ctrls = sd_ctrls_mi1320,
.nctrls = GL860_NCTRLS, .nctrls = GL860_NCTRLS,
@ -174,7 +174,7 @@ static struct sd_desc sd_desc_mi1320 = {
.dq_callback = sd_callback, .dq_callback = sd_callback,
}; };
static struct sd_desc sd_desc_mi2020 = { static const struct sd_desc sd_desc_mi2020 = {
.name = MODULE_NAME, .name = MODULE_NAME,
.ctrls = sd_ctrls_mi2020, .ctrls = sd_ctrls_mi2020,
.nctrls = GL860_NCTRLS, .nctrls = GL860_NCTRLS,
@ -187,7 +187,7 @@ static struct sd_desc sd_desc_mi2020 = {
.dq_callback = sd_callback, .dq_callback = sd_callback,
}; };
static struct sd_desc sd_desc_mi2020b = { static const struct sd_desc sd_desc_mi2020b = {
.name = MODULE_NAME, .name = MODULE_NAME,
.ctrls = sd_ctrls_mi2020b, .ctrls = sd_ctrls_mi2020b,
.nctrls = GL860_NCTRLS, .nctrls = GL860_NCTRLS,
@ -200,7 +200,7 @@ static struct sd_desc sd_desc_mi2020b = {
.dq_callback = sd_callback, .dq_callback = sd_callback,
}; };
static struct sd_desc sd_desc_ov2640 = { static const struct sd_desc sd_desc_ov2640 = {
.name = MODULE_NAME, .name = MODULE_NAME,
.ctrls = sd_ctrls_ov2640, .ctrls = sd_ctrls_ov2640,
.nctrls = GL860_NCTRLS, .nctrls = GL860_NCTRLS,
@ -213,7 +213,7 @@ static struct sd_desc sd_desc_ov2640 = {
.dq_callback = sd_callback, .dq_callback = sd_callback,
}; };
static struct sd_desc sd_desc_ov9655 = { static const struct sd_desc sd_desc_ov9655 = {
.name = MODULE_NAME, .name = MODULE_NAME,
.ctrls = sd_ctrls_ov9655, .ctrls = sd_ctrls_ov9655,
.nctrls = GL860_NCTRLS, .nctrls = GL860_NCTRLS,

View File

@ -1211,7 +1211,7 @@ static int sd_chip_ident(struct gspca_dev *gspca_dev,
#endif #endif
/* sub-driver description for pac7302 */ /* sub-driver description for pac7302 */
static struct sd_desc sd_desc = { static const struct sd_desc sd_desc = {
.name = MODULE_NAME, .name = MODULE_NAME,
.ctrls = sd_ctrls, .ctrls = sd_ctrls,
.nctrls = ARRAY_SIZE(sd_ctrls), .nctrls = ARRAY_SIZE(sd_ctrls),

View File

@ -849,7 +849,7 @@ static int sd_getvflip(struct gspca_dev *gspca_dev, __s32 *val)
} }
/* sub-driver description for pac7311 */ /* sub-driver description for pac7311 */
static struct sd_desc sd_desc = { static const struct sd_desc sd_desc = {
.name = MODULE_NAME, .name = MODULE_NAME,
.ctrls = sd_ctrls, .ctrls = sd_ctrls,
.nctrls = ARRAY_SIZE(sd_ctrls), .nctrls = ARRAY_SIZE(sd_ctrls),

View File

@ -1047,7 +1047,7 @@ static int sd_get_jcomp(struct gspca_dev *gspca_dev,
} }
/* sub-driver description */ /* sub-driver description */
static struct sd_desc sd_desc = { static const struct sd_desc sd_desc = {
.name = MODULE_NAME, .name = MODULE_NAME,
.ctrls = sd_ctrls, .ctrls = sd_ctrls,
.nctrls = ARRAY_SIZE(sd_ctrls), .nctrls = ARRAY_SIZE(sd_ctrls),

View File

@ -673,7 +673,7 @@ static int sd_gethue(struct gspca_dev *gspca_dev, __s32 *val)
} }
/* sub-driver description */ /* sub-driver description */
static struct sd_desc sd_desc = { static const struct sd_desc sd_desc = {
.name = MODULE_NAME, .name = MODULE_NAME,
.ctrls = sd_ctrls, .ctrls = sd_ctrls,
.nctrls = ARRAY_SIZE(sd_ctrls), .nctrls = ARRAY_SIZE(sd_ctrls),