aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2007-02-22 18:41:28 -0500
committerDave Jones <davej@redhat.com>2007-02-22 18:41:28 -0500
commite5524f355a0d272ba5233537a896a668db1f3008 (patch)
tree0d939cbf96fe20fd914e2b480695e992ac307798 /drivers
parenta5220b463e957c9a434295503cdf635d93454d78 (diff)
[AGPGART] Further constification.
Make agp_bridge_driver->aperture_sizes and ->masks const. Also agp_bridge_data->driver Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/agp/agp.h8
-rw-r--r--drivers/char/agp/ali-agp.c6
-rw-r--r--drivers/char/agp/amd-k7-agp.c6
-rw-r--r--drivers/char/agp/amd64-agp.c4
-rw-r--r--drivers/char/agp/ati-agp.c4
-rw-r--r--drivers/char/agp/efficeon-agp.c6
-rw-r--r--drivers/char/agp/generic.c2
-rw-r--r--drivers/char/agp/hp-agp.c2
-rw-r--r--drivers/char/agp/i460-agp.c4
-rw-r--r--drivers/char/agp/intel-agp.c38
-rw-r--r--drivers/char/agp/nvidia-agp.c6
-rw-r--r--drivers/char/agp/parisc-agp.c2
-rw-r--r--drivers/char/agp/sgi-agp.c2
-rw-r--r--drivers/char/agp/sis-agp.c2
-rw-r--r--drivers/char/agp/sworks-agp.c6
-rw-r--r--drivers/char/agp/uninorth-agp.c8
-rw-r--r--drivers/char/agp/via-agp.c6
17 files changed, 56 insertions, 56 deletions
diff --git a/drivers/char/agp/agp.h b/drivers/char/agp/agp.h
index 9bd68d9f0f59..fdbca25a3948 100644
--- a/drivers/char/agp/agp.h
+++ b/drivers/char/agp/agp.h
@@ -93,12 +93,12 @@ struct aper_size_info_fixed {
93 93
94struct agp_bridge_driver { 94struct agp_bridge_driver {
95 struct module *owner; 95 struct module *owner;
96 void *aperture_sizes; 96 const void *aperture_sizes;
97 int num_aperture_sizes; 97 int num_aperture_sizes;
98 enum aper_size_type size_type; 98 enum aper_size_type size_type;
99 int cant_use_aperture; 99 int cant_use_aperture;
100 int needs_scratch_page; 100 int needs_scratch_page;
101 struct gatt_mask *masks; 101 const struct gatt_mask *masks;
102 int (*fetch_size)(void); 102 int (*fetch_size)(void);
103 int (*configure)(void); 103 int (*configure)(void);
104 void (*agp_enable)(struct agp_bridge_data *, u32); 104 void (*agp_enable)(struct agp_bridge_data *, u32);
@@ -119,7 +119,7 @@ struct agp_bridge_driver {
119 119
120struct agp_bridge_data { 120struct agp_bridge_data {
121 const struct agp_version *version; 121 const struct agp_version *version;
122 struct agp_bridge_driver *driver; 122 const struct agp_bridge_driver *driver;
123 struct vm_operations_struct *vm_ops; 123 struct vm_operations_struct *vm_ops;
124 void *previous_size; 124 void *previous_size;
125 void *current_size; 125 void *current_size;
@@ -290,7 +290,7 @@ void agp3_generic_cleanup(void);
290 290
291/* aperture sizes have been standardised since v3 */ 291/* aperture sizes have been standardised since v3 */
292#define AGP_GENERIC_SIZES_ENTRIES 11 292#define AGP_GENERIC_SIZES_ENTRIES 11
293extern struct aper_size_info_16 agp3_generic_sizes[]; 293extern const struct aper_size_info_16 agp3_generic_sizes[];
294 294
295#define virt_to_gart(x) (phys_to_gart(virt_to_phys(x))) 295#define virt_to_gart(x) (phys_to_gart(virt_to_phys(x)))
296#define gart_to_virt(x) (phys_to_virt(gart_to_phys(x))) 296#define gart_to_virt(x) (phys_to_virt(gart_to_phys(x)))
diff --git a/drivers/char/agp/ali-agp.c b/drivers/char/agp/ali-agp.c
index 98177a93076f..5b684fddcc03 100644
--- a/drivers/char/agp/ali-agp.c
+++ b/drivers/char/agp/ali-agp.c
@@ -182,7 +182,7 @@ static void m1541_destroy_page(void * addr)
182 182
183/* Setup function */ 183/* Setup function */
184 184
185static struct aper_size_info_32 ali_generic_sizes[7] = 185static const struct aper_size_info_32 ali_generic_sizes[7] =
186{ 186{
187 {256, 65536, 6, 10}, 187 {256, 65536, 6, 10},
188 {128, 32768, 5, 9}, 188 {128, 32768, 5, 9},
@@ -193,7 +193,7 @@ static struct aper_size_info_32 ali_generic_sizes[7] =
193 {4, 1024, 0, 3} 193 {4, 1024, 0, 3}
194}; 194};
195 195
196static struct agp_bridge_driver ali_generic_bridge = { 196static const struct agp_bridge_driver ali_generic_bridge = {
197 .owner = THIS_MODULE, 197 .owner = THIS_MODULE,
198 .aperture_sizes = ali_generic_sizes, 198 .aperture_sizes = ali_generic_sizes,
199 .size_type = U32_APER_SIZE, 199 .size_type = U32_APER_SIZE,
@@ -217,7 +217,7 @@ static struct agp_bridge_driver ali_generic_bridge = {
217 .agp_type_to_mask_type = agp_generic_type_to_mask_type, 217 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
218}; 218};
219 219
220static struct agp_bridge_driver ali_m1541_bridge = { 220static const struct agp_bridge_driver ali_m1541_bridge = {
221 .owner = THIS_MODULE, 221 .owner = THIS_MODULE,
222 .aperture_sizes = ali_generic_sizes, 222 .aperture_sizes = ali_generic_sizes,
223 .size_type = U32_APER_SIZE, 223 .size_type = U32_APER_SIZE,
diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c
index 3d8d448bf394..e6c534e62846 100644
--- a/drivers/char/agp/amd-k7-agp.c
+++ b/drivers/char/agp/amd-k7-agp.c
@@ -344,7 +344,7 @@ static int amd_remove_memory(struct agp_memory *mem, off_t pg_start, int type)
344 return 0; 344 return 0;
345} 345}
346 346
347static struct aper_size_info_lvl2 amd_irongate_sizes[7] = 347static const struct aper_size_info_lvl2 amd_irongate_sizes[7] =
348{ 348{
349 {2048, 524288, 0x0000000c}, 349 {2048, 524288, 0x0000000c},
350 {1024, 262144, 0x0000000a}, 350 {1024, 262144, 0x0000000a},
@@ -355,12 +355,12 @@ static struct aper_size_info_lvl2 amd_irongate_sizes[7] =
355 {32, 8192, 0x00000000} 355 {32, 8192, 0x00000000}
356}; 356};
357 357
358static struct gatt_mask amd_irongate_masks[] = 358static const struct gatt_mask amd_irongate_masks[] =
359{ 359{
360 {.mask = 1, .type = 0} 360 {.mask = 1, .type = 0}
361}; 361};
362 362
363static struct agp_bridge_driver amd_irongate_driver = { 363static const struct agp_bridge_driver amd_irongate_driver = {
364 .owner = THIS_MODULE, 364 .owner = THIS_MODULE,
365 .aperture_sizes = amd_irongate_sizes, 365 .aperture_sizes = amd_irongate_sizes,
366 .size_type = LVL2_APER_SIZE, 366 .size_type = LVL2_APER_SIZE,
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index 636d984ed4a6..485720486d60 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -192,7 +192,7 @@ static u64 amd64_configure (struct pci_dev *hammer, u64 gatt_table)
192} 192}
193 193
194 194
195static struct aper_size_info_32 amd_8151_sizes[7] = 195static const struct aper_size_info_32 amd_8151_sizes[7] =
196{ 196{
197 {2048, 524288, 9, 0x00000000 }, /* 0 0 0 0 0 0 */ 197 {2048, 524288, 9, 0x00000000 }, /* 0 0 0 0 0 0 */
198 {1024, 262144, 8, 0x00000400 }, /* 1 0 0 0 0 0 */ 198 {1024, 262144, 8, 0x00000400 }, /* 1 0 0 0 0 0 */
@@ -232,7 +232,7 @@ static void amd64_cleanup(void)
232} 232}
233 233
234 234
235static struct agp_bridge_driver amd_8151_driver = { 235static const struct agp_bridge_driver amd_8151_driver = {
236 .owner = THIS_MODULE, 236 .owner = THIS_MODULE,
237 .aperture_sizes = amd_8151_sizes, 237 .aperture_sizes = amd_8151_sizes,
238 .size_type = U32_APER_SIZE, 238 .size_type = U32_APER_SIZE,
diff --git a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c
index 77c9ad68fba9..780e59e588ad 100644
--- a/drivers/char/agp/ati-agp.c
+++ b/drivers/char/agp/ati-agp.c
@@ -24,7 +24,7 @@
24#define ATI_GART_CACHE_ENTRY_CNTRL 0x10 24#define ATI_GART_CACHE_ENTRY_CNTRL 0x10
25 25
26 26
27static struct aper_size_info_lvl2 ati_generic_sizes[7] = 27static const struct aper_size_info_lvl2 ati_generic_sizes[7] =
28{ 28{
29 {2048, 524288, 0x0000000c}, 29 {2048, 524288, 0x0000000c},
30 {1024, 262144, 0x0000000a}, 30 {1024, 262144, 0x0000000a},
@@ -410,7 +410,7 @@ static int ati_free_gatt_table(struct agp_bridge_data *bridge)
410 return 0; 410 return 0;
411} 411}
412 412
413static struct agp_bridge_driver ati_generic_bridge = { 413static const struct agp_bridge_driver ati_generic_bridge = {
414 .owner = THIS_MODULE, 414 .owner = THIS_MODULE,
415 .aperture_sizes = ati_generic_sizes, 415 .aperture_sizes = ati_generic_sizes,
416 .size_type = LVL2_APER_SIZE, 416 .size_type = LVL2_APER_SIZE,
diff --git a/drivers/char/agp/efficeon-agp.c b/drivers/char/agp/efficeon-agp.c
index 658cb1a72d2c..df8da7262853 100644
--- a/drivers/char/agp/efficeon-agp.c
+++ b/drivers/char/agp/efficeon-agp.c
@@ -59,7 +59,7 @@ static struct _efficeon_private {
59 unsigned long l1_table[EFFICEON_L1_SIZE]; 59 unsigned long l1_table[EFFICEON_L1_SIZE];
60} efficeon_private; 60} efficeon_private;
61 61
62static struct gatt_mask efficeon_generic_masks[] = 62static const struct gatt_mask efficeon_generic_masks[] =
63{ 63{
64 {.mask = 0x00000001, .type = 0} 64 {.mask = 0x00000001, .type = 0}
65}; 65};
@@ -70,7 +70,7 @@ static inline unsigned long efficeon_mask_memory(unsigned long addr)
70 return addr | 0x00000001; 70 return addr | 0x00000001;
71} 71}
72 72
73static struct aper_size_info_lvl2 efficeon_generic_sizes[4] = 73static const struct aper_size_info_lvl2 efficeon_generic_sizes[4] =
74{ 74{
75 {256, 65536, 0}, 75 {256, 65536, 0},
76 {128, 32768, 32}, 76 {128, 32768, 32},
@@ -309,7 +309,7 @@ static int efficeon_remove_memory(struct agp_memory * mem, off_t pg_start, int t
309} 309}
310 310
311 311
312static struct agp_bridge_driver efficeon_driver = { 312static const struct agp_bridge_driver efficeon_driver = {
313 .owner = THIS_MODULE, 313 .owner = THIS_MODULE,
314 .aperture_sizes = efficeon_generic_sizes, 314 .aperture_sizes = efficeon_generic_sizes,
315 .size_type = LVL2_APER_SIZE, 315 .size_type = LVL2_APER_SIZE,
diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
index 7923337c3d26..f902d71947ba 100644
--- a/drivers/char/agp/generic.c
+++ b/drivers/char/agp/generic.c
@@ -1340,7 +1340,7 @@ void agp3_generic_cleanup(void)
1340} 1340}
1341EXPORT_SYMBOL(agp3_generic_cleanup); 1341EXPORT_SYMBOL(agp3_generic_cleanup);
1342 1342
1343struct aper_size_info_16 agp3_generic_sizes[AGP_GENERIC_SIZES_ENTRIES] = 1343const struct aper_size_info_16 agp3_generic_sizes[AGP_GENERIC_SIZES_ENTRIES] =
1344{ 1344{
1345 {4096, 1048576, 10,0x000}, 1345 {4096, 1048576, 10,0x000},
1346 {2048, 524288, 9, 0x800}, 1346 {2048, 524288, 9, 0x800},
diff --git a/drivers/char/agp/hp-agp.c b/drivers/char/agp/hp-agp.c
index 847deabf7f9b..79f7c01db75a 100644
--- a/drivers/char/agp/hp-agp.c
+++ b/drivers/char/agp/hp-agp.c
@@ -419,7 +419,7 @@ hp_zx1_enable (struct agp_bridge_data *bridge, u32 mode)
419 agp_device_command(command, (mode & AGP8X_MODE) != 0); 419 agp_device_command(command, (mode & AGP8X_MODE) != 0);
420} 420}
421 421
422struct agp_bridge_driver hp_zx1_driver = { 422struct const agp_bridge_driver hp_zx1_driver = {
423 .owner = THIS_MODULE, 423 .owner = THIS_MODULE,
424 .size_type = FIXED_APER_SIZE, 424 .size_type = FIXED_APER_SIZE,
425 .configure = hp_zx1_configure, 425 .configure = hp_zx1_configure,
diff --git a/drivers/char/agp/i460-agp.c b/drivers/char/agp/i460-agp.c
index 3e7618653abd..1cde376a45ef 100644
--- a/drivers/char/agp/i460-agp.c
+++ b/drivers/char/agp/i460-agp.c
@@ -78,7 +78,7 @@ static struct {
78 } *lp_desc; 78 } *lp_desc;
79} i460; 79} i460;
80 80
81static struct aper_size_info_8 i460_sizes[3] = 81static const struct aper_size_info_8 i460_sizes[3] =
82{ 82{
83 /* 83 /*
84 * The 32GB aperture is only available with a 4M GART page size. Due to the 84 * The 32GB aperture is only available with a 4M GART page size. Due to the
@@ -550,7 +550,7 @@ static unsigned long i460_mask_memory (struct agp_bridge_data *bridge,
550 | (((addr & ~((1 << I460_IO_PAGE_SHIFT) - 1)) & 0xfffff000) >> 12); 550 | (((addr & ~((1 << I460_IO_PAGE_SHIFT) - 1)) & 0xfffff000) >> 12);
551} 551}
552 552
553struct agp_bridge_driver intel_i460_driver = { 553struct const agp_bridge_driver intel_i460_driver = {
554 .owner = THIS_MODULE, 554 .owner = THIS_MODULE,
555 .aperture_sizes = i460_sizes, 555 .aperture_sizes = i460_sizes,
556 .size_type = U8_APER_SIZE, 556 .size_type = U8_APER_SIZE,
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index 06b0bb6d982f..e542a628f1c7 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -63,7 +63,7 @@ extern int agp_memory_reserved;
63#define INTEL_I7505_AGPCTRL 0x70 63#define INTEL_I7505_AGPCTRL 0x70
64#define INTEL_I7505_MCHCFG 0x50 64#define INTEL_I7505_MCHCFG 0x50
65 65
66static struct aper_size_info_fixed intel_i810_sizes[] = 66static const struct aper_size_info_fixed intel_i810_sizes[] =
67{ 67{
68 {64, 16384, 4}, 68 {64, 16384, 4},
69 /* The 32M mode still requires a 64k gatt */ 69 /* The 32M mode still requires a 64k gatt */
@@ -1365,18 +1365,18 @@ static int intel_7505_configure(void)
1365} 1365}
1366 1366
1367/* Setup function */ 1367/* Setup function */
1368static struct gatt_mask intel_generic_masks[] = 1368static const struct gatt_mask intel_generic_masks[] =
1369{ 1369{
1370 {.mask = 0x00000017, .type = 0} 1370 {.mask = 0x00000017, .type = 0}
1371}; 1371};
1372 1372
1373static struct aper_size_info_8 intel_815_sizes[2] = 1373static const struct aper_size_info_8 intel_815_sizes[2] =
1374{ 1374{
1375 {64, 16384, 4, 0}, 1375 {64, 16384, 4, 0},
1376 {32, 8192, 3, 8}, 1376 {32, 8192, 3, 8},
1377}; 1377};
1378 1378
1379static struct aper_size_info_8 intel_8xx_sizes[7] = 1379static const struct aper_size_info_8 intel_8xx_sizes[7] =
1380{ 1380{
1381 {256, 65536, 6, 0}, 1381 {256, 65536, 6, 0},
1382 {128, 32768, 5, 32}, 1382 {128, 32768, 5, 32},
@@ -1387,7 +1387,7 @@ static struct aper_size_info_8 intel_8xx_sizes[7] =
1387 {4, 1024, 0, 63} 1387 {4, 1024, 0, 63}
1388}; 1388};
1389 1389
1390static struct aper_size_info_16 intel_generic_sizes[7] = 1390static const struct aper_size_info_16 intel_generic_sizes[7] =
1391{ 1391{
1392 {256, 65536, 6, 0}, 1392 {256, 65536, 6, 0},
1393 {128, 32768, 5, 32}, 1393 {128, 32768, 5, 32},
@@ -1398,7 +1398,7 @@ static struct aper_size_info_16 intel_generic_sizes[7] =
1398 {4, 1024, 0, 63} 1398 {4, 1024, 0, 63}
1399}; 1399};
1400 1400
1401static struct aper_size_info_8 intel_830mp_sizes[4] = 1401static const struct aper_size_info_8 intel_830mp_sizes[4] =
1402{ 1402{
1403 {256, 65536, 6, 0}, 1403 {256, 65536, 6, 0},
1404 {128, 32768, 5, 32}, 1404 {128, 32768, 5, 32},
@@ -1406,7 +1406,7 @@ static struct aper_size_info_8 intel_830mp_sizes[4] =
1406 {32, 8192, 3, 56} 1406 {32, 8192, 3, 56}
1407}; 1407};
1408 1408
1409static struct agp_bridge_driver intel_generic_driver = { 1409static const struct agp_bridge_driver intel_generic_driver = {
1410 .owner = THIS_MODULE, 1410 .owner = THIS_MODULE,
1411 .aperture_sizes = intel_generic_sizes, 1411 .aperture_sizes = intel_generic_sizes,
1412 .size_type = U16_APER_SIZE, 1412 .size_type = U16_APER_SIZE,
@@ -1430,7 +1430,7 @@ static struct agp_bridge_driver intel_generic_driver = {
1430 .agp_type_to_mask_type = agp_generic_type_to_mask_type, 1430 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
1431}; 1431};
1432 1432
1433static struct agp_bridge_driver intel_810_driver = { 1433static const struct agp_bridge_driver intel_810_driver = {
1434 .owner = THIS_MODULE, 1434 .owner = THIS_MODULE,
1435 .aperture_sizes = intel_i810_sizes, 1435 .aperture_sizes = intel_i810_sizes,
1436 .size_type = FIXED_APER_SIZE, 1436 .size_type = FIXED_APER_SIZE,
@@ -1455,7 +1455,7 @@ static struct agp_bridge_driver intel_810_driver = {
1455 .agp_type_to_mask_type = agp_generic_type_to_mask_type, 1455 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
1456}; 1456};
1457 1457
1458static struct agp_bridge_driver intel_815_driver = { 1458static const struct agp_bridge_driver intel_815_driver = {
1459 .owner = THIS_MODULE, 1459 .owner = THIS_MODULE,
1460 .aperture_sizes = intel_815_sizes, 1460 .aperture_sizes = intel_815_sizes,
1461 .size_type = U8_APER_SIZE, 1461 .size_type = U8_APER_SIZE,
@@ -1479,7 +1479,7 @@ static struct agp_bridge_driver intel_815_driver = {
1479 .agp_type_to_mask_type = agp_generic_type_to_mask_type, 1479 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
1480}; 1480};
1481 1481
1482static struct agp_bridge_driver intel_830_driver = { 1482static const struct agp_bridge_driver intel_830_driver = {
1483 .owner = THIS_MODULE, 1483 .owner = THIS_MODULE,
1484 .aperture_sizes = intel_i830_sizes, 1484 .aperture_sizes = intel_i830_sizes,
1485 .size_type = FIXED_APER_SIZE, 1485 .size_type = FIXED_APER_SIZE,
@@ -1504,7 +1504,7 @@ static struct agp_bridge_driver intel_830_driver = {
1504 .agp_type_to_mask_type = intel_i830_type_to_mask_type, 1504 .agp_type_to_mask_type = intel_i830_type_to_mask_type,
1505}; 1505};
1506 1506
1507static struct agp_bridge_driver intel_820_driver = { 1507static const struct agp_bridge_driver intel_820_driver = {
1508 .owner = THIS_MODULE, 1508 .owner = THIS_MODULE,
1509 .aperture_sizes = intel_8xx_sizes, 1509 .aperture_sizes = intel_8xx_sizes,
1510 .size_type = U8_APER_SIZE, 1510 .size_type = U8_APER_SIZE,
@@ -1528,7 +1528,7 @@ static struct agp_bridge_driver intel_820_driver = {
1528 .agp_type_to_mask_type = agp_generic_type_to_mask_type, 1528 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
1529}; 1529};
1530 1530
1531static struct agp_bridge_driver intel_830mp_driver = { 1531static const struct agp_bridge_driver intel_830mp_driver = {
1532 .owner = THIS_MODULE, 1532 .owner = THIS_MODULE,
1533 .aperture_sizes = intel_830mp_sizes, 1533 .aperture_sizes = intel_830mp_sizes,
1534 .size_type = U8_APER_SIZE, 1534 .size_type = U8_APER_SIZE,
@@ -1552,7 +1552,7 @@ static struct agp_bridge_driver intel_830mp_driver = {
1552 .agp_type_to_mask_type = agp_generic_type_to_mask_type, 1552 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
1553}; 1553};
1554 1554
1555static struct agp_bridge_driver intel_840_driver = { 1555static const struct agp_bridge_driver intel_840_driver = {
1556 .owner = THIS_MODULE, 1556 .owner = THIS_MODULE,
1557 .aperture_sizes = intel_8xx_sizes, 1557 .aperture_sizes = intel_8xx_sizes,
1558 .size_type = U8_APER_SIZE, 1558 .size_type = U8_APER_SIZE,
@@ -1576,7 +1576,7 @@ static struct agp_bridge_driver intel_840_driver = {
1576 .agp_type_to_mask_type = agp_generic_type_to_mask_type, 1576 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
1577}; 1577};
1578 1578
1579static struct agp_bridge_driver intel_845_driver = { 1579static const struct agp_bridge_driver intel_845_driver = {
1580 .owner = THIS_MODULE, 1580 .owner = THIS_MODULE,
1581 .aperture_sizes = intel_8xx_sizes, 1581 .aperture_sizes = intel_8xx_sizes,
1582 .size_type = U8_APER_SIZE, 1582 .size_type = U8_APER_SIZE,
@@ -1600,7 +1600,7 @@ static struct agp_bridge_driver intel_845_driver = {
1600 .agp_type_to_mask_type = agp_generic_type_to_mask_type, 1600 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
1601}; 1601};
1602 1602
1603static struct agp_bridge_driver intel_850_driver = { 1603static const struct agp_bridge_driver intel_850_driver = {
1604 .owner = THIS_MODULE, 1604 .owner = THIS_MODULE,
1605 .aperture_sizes = intel_8xx_sizes, 1605 .aperture_sizes = intel_8xx_sizes,
1606 .size_type = U8_APER_SIZE, 1606 .size_type = U8_APER_SIZE,
@@ -1624,7 +1624,7 @@ static struct agp_bridge_driver intel_850_driver = {
1624 .agp_type_to_mask_type = agp_generic_type_to_mask_type, 1624 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
1625}; 1625};
1626 1626
1627static struct agp_bridge_driver intel_860_driver = { 1627static const struct agp_bridge_driver intel_860_driver = {
1628 .owner = THIS_MODULE, 1628 .owner = THIS_MODULE,
1629 .aperture_sizes = intel_8xx_sizes, 1629 .aperture_sizes = intel_8xx_sizes,
1630 .size_type = U8_APER_SIZE, 1630 .size_type = U8_APER_SIZE,
@@ -1648,7 +1648,7 @@ static struct agp_bridge_driver intel_860_driver = {
1648 .agp_type_to_mask_type = agp_generic_type_to_mask_type, 1648 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
1649}; 1649};
1650 1650
1651static struct agp_bridge_driver intel_915_driver = { 1651static const struct agp_bridge_driver intel_915_driver = {
1652 .owner = THIS_MODULE, 1652 .owner = THIS_MODULE,
1653 .aperture_sizes = intel_i830_sizes, 1653 .aperture_sizes = intel_i830_sizes,
1654 .size_type = FIXED_APER_SIZE, 1654 .size_type = FIXED_APER_SIZE,
@@ -1673,7 +1673,7 @@ static struct agp_bridge_driver intel_915_driver = {
1673 .agp_type_to_mask_type = intel_i830_type_to_mask_type, 1673 .agp_type_to_mask_type = intel_i830_type_to_mask_type,
1674}; 1674};
1675 1675
1676static struct agp_bridge_driver intel_i965_driver = { 1676static const struct agp_bridge_driver intel_i965_driver = {
1677 .owner = THIS_MODULE, 1677 .owner = THIS_MODULE,
1678 .aperture_sizes = intel_i830_sizes, 1678 .aperture_sizes = intel_i830_sizes,
1679 .size_type = FIXED_APER_SIZE, 1679 .size_type = FIXED_APER_SIZE,
@@ -1698,7 +1698,7 @@ static struct agp_bridge_driver intel_i965_driver = {
1698 .agp_type_to_mask_type = intel_i830_type_to_mask_type, 1698 .agp_type_to_mask_type = intel_i830_type_to_mask_type,
1699}; 1699};
1700 1700
1701static struct agp_bridge_driver intel_7505_driver = { 1701static const struct agp_bridge_driver intel_7505_driver = {
1702 .owner = THIS_MODULE, 1702 .owner = THIS_MODULE,
1703 .aperture_sizes = intel_8xx_sizes, 1703 .aperture_sizes = intel_8xx_sizes,
1704 .size_type = U8_APER_SIZE, 1704 .size_type = U8_APER_SIZE,
diff --git a/drivers/char/agp/nvidia-agp.c b/drivers/char/agp/nvidia-agp.c
index 2563286b2fcf..0c9dab557c94 100644
--- a/drivers/char/agp/nvidia-agp.c
+++ b/drivers/char/agp/nvidia-agp.c
@@ -272,7 +272,7 @@ static void nvidia_tlbflush(struct agp_memory *mem)
272} 272}
273 273
274 274
275static struct aper_size_info_8 nvidia_generic_sizes[5] = 275static const struct aper_size_info_8 nvidia_generic_sizes[5] =
276{ 276{
277 {512, 131072, 7, 0}, 277 {512, 131072, 7, 0},
278 {256, 65536, 6, 8}, 278 {256, 65536, 6, 8},
@@ -283,13 +283,13 @@ static struct aper_size_info_8 nvidia_generic_sizes[5] =
283}; 283};
284 284
285 285
286static struct gatt_mask nvidia_generic_masks[] = 286static const struct gatt_mask nvidia_generic_masks[] =
287{ 287{
288 { .mask = 1, .type = 0} 288 { .mask = 1, .type = 0}
289}; 289};
290 290
291 291
292static struct agp_bridge_driver nvidia_driver = { 292static const struct agp_bridge_driver nvidia_driver = {
293 .owner = THIS_MODULE, 293 .owner = THIS_MODULE,
294 .aperture_sizes = nvidia_generic_sizes, 294 .aperture_sizes = nvidia_generic_sizes,
295 .size_type = U8_APER_SIZE, 295 .size_type = U8_APER_SIZE,
diff --git a/drivers/char/agp/parisc-agp.c b/drivers/char/agp/parisc-agp.c
index b7b4590673ae..36d07e3635c6 100644
--- a/drivers/char/agp/parisc-agp.c
+++ b/drivers/char/agp/parisc-agp.c
@@ -210,7 +210,7 @@ parisc_agp_enable(struct agp_bridge_data *bridge, u32 mode)
210 agp_device_command(command, (mode & AGP8X_MODE) != 0); 210 agp_device_command(command, (mode & AGP8X_MODE) != 0);
211} 211}
212 212
213struct agp_bridge_driver parisc_agp_driver = { 213struct const agp_bridge_driver parisc_agp_driver = {
214 .owner = THIS_MODULE, 214 .owner = THIS_MODULE,
215 .size_type = FIXED_APER_SIZE, 215 .size_type = FIXED_APER_SIZE,
216 .configure = parisc_agp_configure, 216 .configure = parisc_agp_configure,
diff --git a/drivers/char/agp/sgi-agp.c b/drivers/char/agp/sgi-agp.c
index 92d1dc45b9be..e12773acf3df 100644
--- a/drivers/char/agp/sgi-agp.c
+++ b/drivers/char/agp/sgi-agp.c
@@ -247,7 +247,7 @@ static struct agp_bridge_data *sgi_tioca_find_bridge(struct pci_dev *pdev)
247 return bridge; 247 return bridge;
248} 248}
249 249
250struct agp_bridge_driver sgi_tioca_driver = { 250struct const agp_bridge_driver sgi_tioca_driver = {
251 .owner = THIS_MODULE, 251 .owner = THIS_MODULE,
252 .size_type = U16_APER_SIZE, 252 .size_type = U16_APER_SIZE,
253 .configure = sgi_tioca_configure, 253 .configure = sgi_tioca_configure,
diff --git a/drivers/char/agp/sis-agp.c b/drivers/char/agp/sis-agp.c
index 60342b708152..125f4282d955 100644
--- a/drivers/char/agp/sis-agp.c
+++ b/drivers/char/agp/sis-agp.c
@@ -108,7 +108,7 @@ static void sis_delayed_enable(struct agp_bridge_data *bridge, u32 mode)
108 } 108 }
109} 109}
110 110
111static struct aper_size_info_8 sis_generic_sizes[7] = 111static const struct aper_size_info_8 sis_generic_sizes[7] =
112{ 112{
113 {256, 65536, 6, 99}, 113 {256, 65536, 6, 99},
114 {128, 32768, 5, 83}, 114 {128, 32768, 5, 83},
diff --git a/drivers/char/agp/sworks-agp.c b/drivers/char/agp/sworks-agp.c
index 9f5ae7714f85..55212a3811fd 100644
--- a/drivers/char/agp/sworks-agp.c
+++ b/drivers/char/agp/sworks-agp.c
@@ -385,12 +385,12 @@ static int serverworks_remove_memory(struct agp_memory *mem, off_t pg_start,
385 return 0; 385 return 0;
386} 386}
387 387
388static struct gatt_mask serverworks_masks[] = 388static const struct gatt_mask serverworks_masks[] =
389{ 389{
390 {.mask = 1, .type = 0} 390 {.mask = 1, .type = 0}
391}; 391};
392 392
393static struct aper_size_info_lvl2 serverworks_sizes[7] = 393static const struct aper_size_info_lvl2 serverworks_sizes[7] =
394{ 394{
395 {2048, 524288, 0x80000000}, 395 {2048, 524288, 0x80000000},
396 {1024, 262144, 0xc0000000}, 396 {1024, 262144, 0xc0000000},
@@ -423,7 +423,7 @@ static void serverworks_agp_enable(struct agp_bridge_data *bridge, u32 mode)
423 agp_device_command(command, 0); 423 agp_device_command(command, 0);
424} 424}
425 425
426static struct agp_bridge_driver sworks_driver = { 426static const struct agp_bridge_driver sworks_driver = {
427 .owner = THIS_MODULE, 427 .owner = THIS_MODULE,
428 .aperture_sizes = serverworks_sizes, 428 .aperture_sizes = serverworks_sizes,
429 .size_type = LVL2_APER_SIZE, 429 .size_type = LVL2_APER_SIZE,
diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c
index 6c45702e542c..292b4ad1ae37 100644
--- a/drivers/char/agp/uninorth-agp.c
+++ b/drivers/char/agp/uninorth-agp.c
@@ -460,7 +460,7 @@ void null_cache_flush(void)
460 460
461/* Setup function */ 461/* Setup function */
462 462
463static struct aper_size_info_32 uninorth_sizes[7] = 463static const struct aper_size_info_32 uninorth_sizes[7] =
464{ 464{
465#if 0 /* Not sure uninorth supports that high aperture sizes */ 465#if 0 /* Not sure uninorth supports that high aperture sizes */
466 {256, 65536, 6, 64}, 466 {256, 65536, 6, 64},
@@ -477,7 +477,7 @@ static struct aper_size_info_32 uninorth_sizes[7] =
477 * Not sure that u3 supports that high aperture sizes but it 477 * Not sure that u3 supports that high aperture sizes but it
478 * would strange if it did not :) 478 * would strange if it did not :)
479 */ 479 */
480static struct aper_size_info_32 u3_sizes[8] = 480static const struct aper_size_info_32 u3_sizes[8] =
481{ 481{
482 {512, 131072, 7, 128}, 482 {512, 131072, 7, 128},
483 {256, 65536, 6, 64}, 483 {256, 65536, 6, 64},
@@ -489,7 +489,7 @@ static struct aper_size_info_32 u3_sizes[8] =
489 {4, 1024, 0, 1} 489 {4, 1024, 0, 1}
490}; 490};
491 491
492struct agp_bridge_driver uninorth_agp_driver = { 492struct const agp_bridge_driver uninorth_agp_driver = {
493 .owner = THIS_MODULE, 493 .owner = THIS_MODULE,
494 .aperture_sizes = (void *)uninorth_sizes, 494 .aperture_sizes = (void *)uninorth_sizes,
495 .size_type = U32_APER_SIZE, 495 .size_type = U32_APER_SIZE,
@@ -514,7 +514,7 @@ struct agp_bridge_driver uninorth_agp_driver = {
514 .cant_use_aperture = 1, 514 .cant_use_aperture = 1,
515}; 515};
516 516
517struct agp_bridge_driver u3_agp_driver = { 517struct const agp_bridge_driver u3_agp_driver = {
518 .owner = THIS_MODULE, 518 .owner = THIS_MODULE,
519 .aperture_sizes = (void *)u3_sizes, 519 .aperture_sizes = (void *)u3_sizes,
520 .size_type = U32_APER_SIZE, 520 .size_type = U32_APER_SIZE,
diff --git a/drivers/char/agp/via-agp.c b/drivers/char/agp/via-agp.c
index 2e7c04370cd9..a2bb4eccaab4 100644
--- a/drivers/char/agp/via-agp.c
+++ b/drivers/char/agp/via-agp.c
@@ -89,7 +89,7 @@ static void via_tlbflush(struct agp_memory *mem)
89} 89}
90 90
91 91
92static struct aper_size_info_8 via_generic_sizes[9] = 92static const struct aper_size_info_8 via_generic_sizes[9] =
93{ 93{
94 {256, 65536, 6, 0}, 94 {256, 65536, 6, 0},
95 {128, 32768, 5, 128}, 95 {128, 32768, 5, 128},
@@ -170,7 +170,7 @@ static void via_tlbflush_agp3(struct agp_memory *mem)
170} 170}
171 171
172 172
173static struct agp_bridge_driver via_agp3_driver = { 173static const struct agp_bridge_driver via_agp3_driver = {
174 .owner = THIS_MODULE, 174 .owner = THIS_MODULE,
175 .aperture_sizes = agp3_generic_sizes, 175 .aperture_sizes = agp3_generic_sizes,
176 .size_type = U8_APER_SIZE, 176 .size_type = U8_APER_SIZE,
@@ -194,7 +194,7 @@ static struct agp_bridge_driver via_agp3_driver = {
194 .agp_type_to_mask_type = agp_generic_type_to_mask_type, 194 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
195}; 195};
196 196
197static struct agp_bridge_driver via_driver = { 197static const struct agp_bridge_driver via_driver = {
198 .owner = THIS_MODULE, 198 .owner = THIS_MODULE,
199 .aperture_sizes = via_generic_sizes, 199 .aperture_sizes = via_generic_sizes,
200 .size_type = U8_APER_SIZE, 200 .size_type = U8_APER_SIZE,