V4L/DVB (13898): gspca - some subdrivers: Make sd_desc const.
authorMárton Németh <nm127@freemail.hu>
Tue, 5 Jan 2010 15:39:02 +0000 (12:39 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 26 Feb 2010 18:10:29 +0000 (15:10 -0300)
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>
drivers/media/video/gspca/conex.c
drivers/media/video/gspca/etoms.c
drivers/media/video/gspca/gl860/gl860.c
drivers/media/video/gspca/pac7302.c
drivers/media/video/gspca/pac7311.c
drivers/media/video/gspca/spca500.c
drivers/media/video/gspca/spca506.c

index c98b5d69c43809e8f04f9f7161be0f445aa26efd..7a76eb487d87885f9a73fdbc5efa4e204ddcabaf 100644 (file)
@@ -1032,7 +1032,7 @@ static int sd_get_jcomp(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),
index fdf4c0ec5e7af6c93adf25cf684fd59efe478320..87ce6af9cef2165cd44b61f13df1c3323efe6072 100644 (file)
@@ -851,7 +851,7 @@ static int sd_getautogain(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),
index 4878c8f66543dc26ac88d7179f642dcabc7d3453..9e42476c0eafdc55ca04eb0423d4a9f2fb6a9283 100644 (file)
@@ -161,7 +161,7 @@ static int gl860_build_control_table(struct gspca_dev *gspca_dev)
 
 /*==================== sud-driver structure initialisation =================*/
 
-static struct sd_desc sd_desc_mi1320 = {
+static const struct sd_desc sd_desc_mi1320 = {
        .name        = MODULE_NAME,
        .ctrls       = sd_ctrls_mi1320,
        .nctrls      = GL860_NCTRLS,
@@ -174,7 +174,7 @@ static struct sd_desc sd_desc_mi1320 = {
        .dq_callback = sd_callback,
 };
 
-static struct sd_desc sd_desc_mi2020 = {
+static const struct sd_desc sd_desc_mi2020 = {
        .name        = MODULE_NAME,
        .ctrls       = sd_ctrls_mi2020,
        .nctrls      = GL860_NCTRLS,
@@ -187,7 +187,7 @@ static struct sd_desc sd_desc_mi2020 = {
        .dq_callback = sd_callback,
 };
 
-static struct sd_desc sd_desc_mi2020b = {
+static const struct sd_desc sd_desc_mi2020b = {
        .name        = MODULE_NAME,
        .ctrls       = sd_ctrls_mi2020b,
        .nctrls      = GL860_NCTRLS,
@@ -200,7 +200,7 @@ static struct sd_desc sd_desc_mi2020b = {
        .dq_callback = sd_callback,
 };
 
-static struct sd_desc sd_desc_ov2640 = {
+static const struct sd_desc sd_desc_ov2640 = {
        .name        = MODULE_NAME,
        .ctrls       = sd_ctrls_ov2640,
        .nctrls      = GL860_NCTRLS,
@@ -213,7 +213,7 @@ static struct sd_desc sd_desc_ov2640 = {
        .dq_callback = sd_callback,
 };
 
-static struct sd_desc sd_desc_ov9655 = {
+static const struct sd_desc sd_desc_ov9655 = {
        .name        = MODULE_NAME,
        .ctrls       = sd_ctrls_ov9655,
        .nctrls      = GL860_NCTRLS,
index de0b66c4b56e708f8e4059007b201466bd5fa529..be0a353afa3a19157ec1340dfa64200db5f7301c 100644 (file)
@@ -1211,7 +1211,7 @@ static int sd_chip_ident(struct gspca_dev *gspca_dev,
 #endif
 
 /* sub-driver description for pac7302 */
-static struct sd_desc sd_desc = {
+static const struct sd_desc sd_desc = {
        .name = MODULE_NAME,
        .ctrls = sd_ctrls,
        .nctrls = ARRAY_SIZE(sd_ctrls),
index 42cfcdfd8f4f114649d1e15be5582b52a082a15d..41f87e9a3426c35784f52b0ecef3d32177e85424 100644 (file)
@@ -849,7 +849,7 @@ static int sd_getvflip(struct gspca_dev *gspca_dev, __s32 *val)
 }
 
 /* sub-driver description for pac7311 */
-static struct sd_desc sd_desc = {
+static const struct sd_desc sd_desc = {
        .name = MODULE_NAME,
        .ctrls = sd_ctrls,
        .nctrls = ARRAY_SIZE(sd_ctrls),
index fe46868a87f2e71bf7c6ace69b0745fdbd655ae8..7cc302a389de7564163308e345695490726c84d7 100644 (file)
@@ -1047,7 +1047,7 @@ static int sd_get_jcomp(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),
index 39257e4e074ffa14131c0518cbef09736477e29d..a2cc81ccf367817c09a68ee9ec2f56b05c4baeb7 100644 (file)
@@ -673,7 +673,7 @@ static int sd_gethue(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),