aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2006-12-08 05:40:28 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:29:05 -0500
commitd95159cf1b12e8e4b169094b35cbd93b887cb939 (patch)
treeda8f8f13ee4d73d7653f5004751ca00f21bc872a /drivers
parentadf6b206546414fd006098d027e81f2b576ea2aa (diff)
[PATCH] various fbdev files: mark structs and array read-only
- move some structs and arrays to the read-only (.rodata) section [akpm@osdl.org: build fix] Signed-off-by: Helge Deller <deller@gmx.de> Acked-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/backlight/backlight.c2
-rw-r--r--drivers/video/backlight/lcd.c2
-rw-r--r--drivers/video/cfbimgblt.c8
-rw-r--r--drivers/video/console/sticon.c2
-rw-r--r--drivers/video/fbcvt.c2
-rw-r--r--drivers/video/fbmon.c2
6 files changed, 9 insertions, 9 deletions
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index 27597c576eff..f439a588394a 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
@@ -142,7 +142,7 @@ static struct class backlight_class = {
142 .store = _store, \ 142 .store = _store, \
143} 143}
144 144
145static struct class_device_attribute bl_class_device_attributes[] = { 145static const struct class_device_attribute bl_class_device_attributes[] = {
146 DECLARE_ATTR(power, 0644, backlight_show_power, backlight_store_power), 146 DECLARE_ATTR(power, 0644, backlight_show_power, backlight_store_power),
147 DECLARE_ATTR(brightness, 0644, backlight_show_brightness, 147 DECLARE_ATTR(brightness, 0644, backlight_show_brightness,
148 backlight_store_brightness), 148 backlight_store_brightness),
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c
index bc8ab005a3fb..58c37d489107 100644
--- a/drivers/video/backlight/lcd.c
+++ b/drivers/video/backlight/lcd.c
@@ -121,7 +121,7 @@ static struct class lcd_class = {
121 .store = _store, \ 121 .store = _store, \
122} 122}
123 123
124static struct class_device_attribute lcd_class_device_attributes[] = { 124static const struct class_device_attribute lcd_class_device_attributes[] = {
125 DECLARE_ATTR(power, 0644, lcd_show_power, lcd_store_power), 125 DECLARE_ATTR(power, 0644, lcd_show_power, lcd_store_power),
126 DECLARE_ATTR(contrast, 0644, lcd_show_contrast, lcd_store_contrast), 126 DECLARE_ATTR(contrast, 0644, lcd_show_contrast, lcd_store_contrast),
127 DECLARE_ATTR(max_contrast, 0444, lcd_show_max_contrast, NULL), 127 DECLARE_ATTR(max_contrast, 0444, lcd_show_max_contrast, NULL),
diff --git a/drivers/video/cfbimgblt.c b/drivers/video/cfbimgblt.c
index 51d35386a945..261004473c8e 100644
--- a/drivers/video/cfbimgblt.c
+++ b/drivers/video/cfbimgblt.c
@@ -42,7 +42,7 @@
42#define DPRINTK(fmt, args...) 42#define DPRINTK(fmt, args...)
43#endif 43#endif
44 44
45static u32 cfb_tab8[] = { 45static const u32 cfb_tab8[] = {
46#if defined(__BIG_ENDIAN) 46#if defined(__BIG_ENDIAN)
47 0x00000000,0x000000ff,0x0000ff00,0x0000ffff, 47 0x00000000,0x000000ff,0x0000ff00,0x0000ffff,
48 0x00ff0000,0x00ff00ff,0x00ffff00,0x00ffffff, 48 0x00ff0000,0x00ff00ff,0x00ffff00,0x00ffffff,
@@ -58,7 +58,7 @@ static u32 cfb_tab8[] = {
58#endif 58#endif
59}; 59};
60 60
61static u32 cfb_tab16[] = { 61static const u32 cfb_tab16[] = {
62#if defined(__BIG_ENDIAN) 62#if defined(__BIG_ENDIAN)
63 0x00000000, 0x0000ffff, 0xffff0000, 0xffffffff 63 0x00000000, 0x0000ffff, 0xffff0000, 0xffffffff
64#elif defined(__LITTLE_ENDIAN) 64#elif defined(__LITTLE_ENDIAN)
@@ -68,7 +68,7 @@ static u32 cfb_tab16[] = {
68#endif 68#endif
69}; 69};
70 70
71static u32 cfb_tab32[] = { 71static const u32 cfb_tab32[] = {
72 0x00000000, 0xffffffff 72 0x00000000, 0xffffffff
73}; 73};
74 74
@@ -218,7 +218,7 @@ static inline void fast_imageblit(const struct fb_image *image, struct fb_info *
218 u32 bit_mask, end_mask, eorx, shift; 218 u32 bit_mask, end_mask, eorx, shift;
219 const char *s = image->data, *src; 219 const char *s = image->data, *src;
220 u32 __iomem *dst; 220 u32 __iomem *dst;
221 u32 *tab = NULL; 221 const u32 *tab = NULL;
222 int i, j, k; 222 int i, j, k;
223 223
224 switch (bpp) { 224 switch (bpp) {
diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c
index 45586aaabd1e..57b21e533036 100644
--- a/drivers/video/console/sticon.c
+++ b/drivers/video/console/sticon.c
@@ -345,7 +345,7 @@ static void sticon_save_screen(struct vc_data *conp)
345{ 345{
346} 346}
347 347
348static struct consw sti_con = { 348static const struct consw sti_con = {
349 .owner = THIS_MODULE, 349 .owner = THIS_MODULE,
350 .con_startup = sticon_startup, 350 .con_startup = sticon_startup,
351 .con_init = sticon_init, 351 .con_init = sticon_init,
diff --git a/drivers/video/fbcvt.c b/drivers/video/fbcvt.c
index b5498999c4ec..0847c5e72cbd 100644
--- a/drivers/video/fbcvt.c
+++ b/drivers/video/fbcvt.c
@@ -57,7 +57,7 @@ struct fb_cvt_data {
57 u32 status; 57 u32 status;
58}; 58};
59 59
60static int fb_cvt_vbi_tab[] = { 60static const unsigned char fb_cvt_vbi_tab[] = {
61 4, /* 4:3 */ 61 4, /* 4:3 */
62 5, /* 16:9 */ 62 5, /* 16:9 */
63 6, /* 16:10 */ 63 6, /* 16:10 */
diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c
index de93139ccbb5..6b385c39b8b5 100644
--- a/drivers/video/fbmon.c
+++ b/drivers/video/fbmon.c
@@ -58,7 +58,7 @@ struct broken_edid {
58 u32 fix; 58 u32 fix;
59}; 59};
60 60
61static struct broken_edid brokendb[] = { 61static const struct broken_edid brokendb[] = {
62 /* DEC FR-PCXAV-YZ */ 62 /* DEC FR-PCXAV-YZ */
63 { 63 {
64 .manufacturer = "DEC", 64 .manufacturer = "DEC",