Skip to content

Commit 0f55564

Browse files
JuliaLawalldanvet
authored andcommitted
drm/i915: constify intel_dvo_dev_ops structures
The intel_dvo_dev_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 2b81b84 commit 0f55564

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

drivers/gpu/drm/i915/dvo.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ struct intel_dvo_dev_ops {
129129
void (*dump_regs)(struct intel_dvo_device *dvo);
130130
};
131131

132-
extern struct intel_dvo_dev_ops sil164_ops;
133-
extern struct intel_dvo_dev_ops ch7xxx_ops;
134-
extern struct intel_dvo_dev_ops ivch_ops;
135-
extern struct intel_dvo_dev_ops tfp410_ops;
136-
extern struct intel_dvo_dev_ops ch7017_ops;
137-
extern struct intel_dvo_dev_ops ns2501_ops;
132+
extern const struct intel_dvo_dev_ops sil164_ops;
133+
extern const struct intel_dvo_dev_ops ch7xxx_ops;
134+
extern const struct intel_dvo_dev_ops ivch_ops;
135+
extern const struct intel_dvo_dev_ops tfp410_ops;
136+
extern const struct intel_dvo_dev_ops ch7017_ops;
137+
extern const struct intel_dvo_dev_ops ns2501_ops;
138138

139139
#endif /* _INTEL_DVO_H */

drivers/gpu/drm/i915/dvo_ch7017.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ static void ch7017_destroy(struct intel_dvo_device *dvo)
402402
}
403403
}
404404

405-
struct intel_dvo_dev_ops ch7017_ops = {
405+
const struct intel_dvo_dev_ops ch7017_ops = {
406406
.init = ch7017_init,
407407
.detect = ch7017_detect,
408408
.mode_valid = ch7017_mode_valid,

drivers/gpu/drm/i915/dvo_ch7xxx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ static void ch7xxx_destroy(struct intel_dvo_device *dvo)
356356
}
357357
}
358358

359-
struct intel_dvo_dev_ops ch7xxx_ops = {
359+
const struct intel_dvo_dev_ops ch7xxx_ops = {
360360
.init = ch7xxx_init,
361361
.detect = ch7xxx_detect,
362362
.mode_valid = ch7xxx_mode_valid,

drivers/gpu/drm/i915/dvo_ivch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ static void ivch_destroy(struct intel_dvo_device *dvo)
490490
}
491491
}
492492

493-
struct intel_dvo_dev_ops ivch_ops = {
493+
const struct intel_dvo_dev_ops ivch_ops = {
494494
.init = ivch_init,
495495
.dpms = ivch_dpms,
496496
.get_hw_state = ivch_get_hw_state,

drivers/gpu/drm/i915/dvo_ns2501.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ static void ns2501_destroy(struct intel_dvo_device *dvo)
698698
}
699699
}
700700

701-
struct intel_dvo_dev_ops ns2501_ops = {
701+
const struct intel_dvo_dev_ops ns2501_ops = {
702702
.init = ns2501_init,
703703
.detect = ns2501_detect,
704704
.mode_valid = ns2501_mode_valid,

drivers/gpu/drm/i915/dvo_sil164.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ static void sil164_destroy(struct intel_dvo_device *dvo)
267267
}
268268
}
269269

270-
struct intel_dvo_dev_ops sil164_ops = {
270+
const struct intel_dvo_dev_ops sil164_ops = {
271271
.init = sil164_init,
272272
.detect = sil164_detect,
273273
.mode_valid = sil164_mode_valid,

drivers/gpu/drm/i915/dvo_tfp410.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ static void tfp410_destroy(struct intel_dvo_device *dvo)
306306
}
307307
}
308308

309-
struct intel_dvo_dev_ops tfp410_ops = {
309+
const struct intel_dvo_dev_ops tfp410_ops = {
310310
.init = tfp410_init,
311311
.detect = tfp410_detect,
312312
.mode_valid = tfp410_mode_valid,

0 commit comments

Comments
 (0)