Commit e5524f35 authored by Dave Jones's avatar Dave Jones

[AGPGART] Further constification.

Make agp_bridge_driver->aperture_sizes and ->masks const.
Also agp_bridge_data->driver
Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent a5220b46
...@@ -93,12 +93,12 @@ struct aper_size_info_fixed { ...@@ -93,12 +93,12 @@ struct aper_size_info_fixed {
struct agp_bridge_driver { struct agp_bridge_driver {
struct module *owner; struct module *owner;
void *aperture_sizes; const void *aperture_sizes;
int num_aperture_sizes; int num_aperture_sizes;
enum aper_size_type size_type; enum aper_size_type size_type;
int cant_use_aperture; int cant_use_aperture;
int needs_scratch_page; int needs_scratch_page;
struct gatt_mask *masks; const struct gatt_mask *masks;
int (*fetch_size)(void); int (*fetch_size)(void);
int (*configure)(void); int (*configure)(void);
void (*agp_enable)(struct agp_bridge_data *, u32); void (*agp_enable)(struct agp_bridge_data *, u32);
...@@ -119,7 +119,7 @@ struct agp_bridge_driver { ...@@ -119,7 +119,7 @@ struct agp_bridge_driver {
struct agp_bridge_data { struct agp_bridge_data {
const struct agp_version *version; const struct agp_version *version;
struct agp_bridge_driver *driver; const struct agp_bridge_driver *driver;
struct vm_operations_struct *vm_ops; struct vm_operations_struct *vm_ops;
void *previous_size; void *previous_size;
void *current_size; void *current_size;
...@@ -290,7 +290,7 @@ void agp3_generic_cleanup(void); ...@@ -290,7 +290,7 @@ void agp3_generic_cleanup(void);
/* aperture sizes have been standardised since v3 */ /* aperture sizes have been standardised since v3 */
#define AGP_GENERIC_SIZES_ENTRIES 11 #define AGP_GENERIC_SIZES_ENTRIES 11
extern struct aper_size_info_16 agp3_generic_sizes[]; extern const struct aper_size_info_16 agp3_generic_sizes[];
#define virt_to_gart(x) (phys_to_gart(virt_to_phys(x))) #define virt_to_gart(x) (phys_to_gart(virt_to_phys(x)))
#define gart_to_virt(x) (phys_to_virt(gart_to_phys(x))) #define gart_to_virt(x) (phys_to_virt(gart_to_phys(x)))
......
...@@ -182,7 +182,7 @@ static void m1541_destroy_page(void * addr) ...@@ -182,7 +182,7 @@ static void m1541_destroy_page(void * addr)
/* Setup function */ /* Setup function */
static struct aper_size_info_32 ali_generic_sizes[7] = static const struct aper_size_info_32 ali_generic_sizes[7] =
{ {
{256, 65536, 6, 10}, {256, 65536, 6, 10},
{128, 32768, 5, 9}, {128, 32768, 5, 9},
...@@ -193,7 +193,7 @@ static struct aper_size_info_32 ali_generic_sizes[7] = ...@@ -193,7 +193,7 @@ static struct aper_size_info_32 ali_generic_sizes[7] =
{4, 1024, 0, 3} {4, 1024, 0, 3}
}; };
static struct agp_bridge_driver ali_generic_bridge = { static const struct agp_bridge_driver ali_generic_bridge = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = ali_generic_sizes, .aperture_sizes = ali_generic_sizes,
.size_type = U32_APER_SIZE, .size_type = U32_APER_SIZE,
...@@ -217,7 +217,7 @@ static struct agp_bridge_driver ali_generic_bridge = { ...@@ -217,7 +217,7 @@ static struct agp_bridge_driver ali_generic_bridge = {
.agp_type_to_mask_type = agp_generic_type_to_mask_type, .agp_type_to_mask_type = agp_generic_type_to_mask_type,
}; };
static struct agp_bridge_driver ali_m1541_bridge = { static const struct agp_bridge_driver ali_m1541_bridge = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = ali_generic_sizes, .aperture_sizes = ali_generic_sizes,
.size_type = U32_APER_SIZE, .size_type = U32_APER_SIZE,
......
...@@ -344,7 +344,7 @@ static int amd_remove_memory(struct agp_memory *mem, off_t pg_start, int type) ...@@ -344,7 +344,7 @@ static int amd_remove_memory(struct agp_memory *mem, off_t pg_start, int type)
return 0; return 0;
} }
static struct aper_size_info_lvl2 amd_irongate_sizes[7] = static const struct aper_size_info_lvl2 amd_irongate_sizes[7] =
{ {
{2048, 524288, 0x0000000c}, {2048, 524288, 0x0000000c},
{1024, 262144, 0x0000000a}, {1024, 262144, 0x0000000a},
...@@ -355,12 +355,12 @@ static struct aper_size_info_lvl2 amd_irongate_sizes[7] = ...@@ -355,12 +355,12 @@ static struct aper_size_info_lvl2 amd_irongate_sizes[7] =
{32, 8192, 0x00000000} {32, 8192, 0x00000000}
}; };
static struct gatt_mask amd_irongate_masks[] = static const struct gatt_mask amd_irongate_masks[] =
{ {
{.mask = 1, .type = 0} {.mask = 1, .type = 0}
}; };
static struct agp_bridge_driver amd_irongate_driver = { static const struct agp_bridge_driver amd_irongate_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = amd_irongate_sizes, .aperture_sizes = amd_irongate_sizes,
.size_type = LVL2_APER_SIZE, .size_type = LVL2_APER_SIZE,
......
...@@ -192,7 +192,7 @@ static u64 amd64_configure (struct pci_dev *hammer, u64 gatt_table) ...@@ -192,7 +192,7 @@ static u64 amd64_configure (struct pci_dev *hammer, u64 gatt_table)
} }
static struct aper_size_info_32 amd_8151_sizes[7] = static const struct aper_size_info_32 amd_8151_sizes[7] =
{ {
{2048, 524288, 9, 0x00000000 }, /* 0 0 0 0 0 0 */ {2048, 524288, 9, 0x00000000 }, /* 0 0 0 0 0 0 */
{1024, 262144, 8, 0x00000400 }, /* 1 0 0 0 0 0 */ {1024, 262144, 8, 0x00000400 }, /* 1 0 0 0 0 0 */
...@@ -232,7 +232,7 @@ static void amd64_cleanup(void) ...@@ -232,7 +232,7 @@ static void amd64_cleanup(void)
} }
static struct agp_bridge_driver amd_8151_driver = { static const struct agp_bridge_driver amd_8151_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = amd_8151_sizes, .aperture_sizes = amd_8151_sizes,
.size_type = U32_APER_SIZE, .size_type = U32_APER_SIZE,
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#define ATI_GART_CACHE_ENTRY_CNTRL 0x10 #define ATI_GART_CACHE_ENTRY_CNTRL 0x10
static struct aper_size_info_lvl2 ati_generic_sizes[7] = static const struct aper_size_info_lvl2 ati_generic_sizes[7] =
{ {
{2048, 524288, 0x0000000c}, {2048, 524288, 0x0000000c},
{1024, 262144, 0x0000000a}, {1024, 262144, 0x0000000a},
...@@ -410,7 +410,7 @@ static int ati_free_gatt_table(struct agp_bridge_data *bridge) ...@@ -410,7 +410,7 @@ static int ati_free_gatt_table(struct agp_bridge_data *bridge)
return 0; return 0;
} }
static struct agp_bridge_driver ati_generic_bridge = { static const struct agp_bridge_driver ati_generic_bridge = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = ati_generic_sizes, .aperture_sizes = ati_generic_sizes,
.size_type = LVL2_APER_SIZE, .size_type = LVL2_APER_SIZE,
......
...@@ -59,7 +59,7 @@ static struct _efficeon_private { ...@@ -59,7 +59,7 @@ static struct _efficeon_private {
unsigned long l1_table[EFFICEON_L1_SIZE]; unsigned long l1_table[EFFICEON_L1_SIZE];
} efficeon_private; } efficeon_private;
static struct gatt_mask efficeon_generic_masks[] = static const struct gatt_mask efficeon_generic_masks[] =
{ {
{.mask = 0x00000001, .type = 0} {.mask = 0x00000001, .type = 0}
}; };
...@@ -70,7 +70,7 @@ static inline unsigned long efficeon_mask_memory(unsigned long addr) ...@@ -70,7 +70,7 @@ static inline unsigned long efficeon_mask_memory(unsigned long addr)
return addr | 0x00000001; return addr | 0x00000001;
} }
static struct aper_size_info_lvl2 efficeon_generic_sizes[4] = static const struct aper_size_info_lvl2 efficeon_generic_sizes[4] =
{ {
{256, 65536, 0}, {256, 65536, 0},
{128, 32768, 32}, {128, 32768, 32},
...@@ -309,7 +309,7 @@ static int efficeon_remove_memory(struct agp_memory * mem, off_t pg_start, int t ...@@ -309,7 +309,7 @@ static int efficeon_remove_memory(struct agp_memory * mem, off_t pg_start, int t
} }
static struct agp_bridge_driver efficeon_driver = { static const struct agp_bridge_driver efficeon_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = efficeon_generic_sizes, .aperture_sizes = efficeon_generic_sizes,
.size_type = LVL2_APER_SIZE, .size_type = LVL2_APER_SIZE,
......
...@@ -1340,7 +1340,7 @@ void agp3_generic_cleanup(void) ...@@ -1340,7 +1340,7 @@ void agp3_generic_cleanup(void)
} }
EXPORT_SYMBOL(agp3_generic_cleanup); EXPORT_SYMBOL(agp3_generic_cleanup);
struct aper_size_info_16 agp3_generic_sizes[AGP_GENERIC_SIZES_ENTRIES] = const struct aper_size_info_16 agp3_generic_sizes[AGP_GENERIC_SIZES_ENTRIES] =
{ {
{4096, 1048576, 10,0x000}, {4096, 1048576, 10,0x000},
{2048, 524288, 9, 0x800}, {2048, 524288, 9, 0x800},
......
...@@ -419,7 +419,7 @@ hp_zx1_enable (struct agp_bridge_data *bridge, u32 mode) ...@@ -419,7 +419,7 @@ hp_zx1_enable (struct agp_bridge_data *bridge, u32 mode)
agp_device_command(command, (mode & AGP8X_MODE) != 0); agp_device_command(command, (mode & AGP8X_MODE) != 0);
} }
struct agp_bridge_driver hp_zx1_driver = { struct const agp_bridge_driver hp_zx1_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.size_type = FIXED_APER_SIZE, .size_type = FIXED_APER_SIZE,
.configure = hp_zx1_configure, .configure = hp_zx1_configure,
......
...@@ -78,7 +78,7 @@ static struct { ...@@ -78,7 +78,7 @@ static struct {
} *lp_desc; } *lp_desc;
} i460; } i460;
static struct aper_size_info_8 i460_sizes[3] = static const struct aper_size_info_8 i460_sizes[3] =
{ {
/* /*
* The 32GB aperture is only available with a 4M GART page size. Due to the * 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,7 +550,7 @@ static unsigned long i460_mask_memory (struct agp_bridge_data *bridge,
| (((addr & ~((1 << I460_IO_PAGE_SHIFT) - 1)) & 0xfffff000) >> 12); | (((addr & ~((1 << I460_IO_PAGE_SHIFT) - 1)) & 0xfffff000) >> 12);
} }
struct agp_bridge_driver intel_i460_driver = { struct const agp_bridge_driver intel_i460_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = i460_sizes, .aperture_sizes = i460_sizes,
.size_type = U8_APER_SIZE, .size_type = U8_APER_SIZE,
......
...@@ -63,7 +63,7 @@ extern int agp_memory_reserved; ...@@ -63,7 +63,7 @@ extern int agp_memory_reserved;
#define INTEL_I7505_AGPCTRL 0x70 #define INTEL_I7505_AGPCTRL 0x70
#define INTEL_I7505_MCHCFG 0x50 #define INTEL_I7505_MCHCFG 0x50
static struct aper_size_info_fixed intel_i810_sizes[] = static const struct aper_size_info_fixed intel_i810_sizes[] =
{ {
{64, 16384, 4}, {64, 16384, 4},
/* The 32M mode still requires a 64k gatt */ /* The 32M mode still requires a 64k gatt */
...@@ -1365,18 +1365,18 @@ static int intel_7505_configure(void) ...@@ -1365,18 +1365,18 @@ static int intel_7505_configure(void)
} }
/* Setup function */ /* Setup function */
static struct gatt_mask intel_generic_masks[] = static const struct gatt_mask intel_generic_masks[] =
{ {
{.mask = 0x00000017, .type = 0} {.mask = 0x00000017, .type = 0}
}; };
static struct aper_size_info_8 intel_815_sizes[2] = static const struct aper_size_info_8 intel_815_sizes[2] =
{ {
{64, 16384, 4, 0}, {64, 16384, 4, 0},
{32, 8192, 3, 8}, {32, 8192, 3, 8},
}; };
static struct aper_size_info_8 intel_8xx_sizes[7] = static const struct aper_size_info_8 intel_8xx_sizes[7] =
{ {
{256, 65536, 6, 0}, {256, 65536, 6, 0},
{128, 32768, 5, 32}, {128, 32768, 5, 32},
...@@ -1387,7 +1387,7 @@ static struct aper_size_info_8 intel_8xx_sizes[7] = ...@@ -1387,7 +1387,7 @@ static struct aper_size_info_8 intel_8xx_sizes[7] =
{4, 1024, 0, 63} {4, 1024, 0, 63}
}; };
static struct aper_size_info_16 intel_generic_sizes[7] = static const struct aper_size_info_16 intel_generic_sizes[7] =
{ {
{256, 65536, 6, 0}, {256, 65536, 6, 0},
{128, 32768, 5, 32}, {128, 32768, 5, 32},
...@@ -1398,7 +1398,7 @@ static struct aper_size_info_16 intel_generic_sizes[7] = ...@@ -1398,7 +1398,7 @@ static struct aper_size_info_16 intel_generic_sizes[7] =
{4, 1024, 0, 63} {4, 1024, 0, 63}
}; };
static struct aper_size_info_8 intel_830mp_sizes[4] = static const struct aper_size_info_8 intel_830mp_sizes[4] =
{ {
{256, 65536, 6, 0}, {256, 65536, 6, 0},
{128, 32768, 5, 32}, {128, 32768, 5, 32},
...@@ -1406,7 +1406,7 @@ static struct aper_size_info_8 intel_830mp_sizes[4] = ...@@ -1406,7 +1406,7 @@ static struct aper_size_info_8 intel_830mp_sizes[4] =
{32, 8192, 3, 56} {32, 8192, 3, 56}
}; };
static struct agp_bridge_driver intel_generic_driver = { static const struct agp_bridge_driver intel_generic_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = intel_generic_sizes, .aperture_sizes = intel_generic_sizes,
.size_type = U16_APER_SIZE, .size_type = U16_APER_SIZE,
...@@ -1430,7 +1430,7 @@ static struct agp_bridge_driver intel_generic_driver = { ...@@ -1430,7 +1430,7 @@ static struct agp_bridge_driver intel_generic_driver = {
.agp_type_to_mask_type = agp_generic_type_to_mask_type, .agp_type_to_mask_type = agp_generic_type_to_mask_type,
}; };
static struct agp_bridge_driver intel_810_driver = { static const struct agp_bridge_driver intel_810_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = intel_i810_sizes, .aperture_sizes = intel_i810_sizes,
.size_type = FIXED_APER_SIZE, .size_type = FIXED_APER_SIZE,
...@@ -1455,7 +1455,7 @@ static struct agp_bridge_driver intel_810_driver = { ...@@ -1455,7 +1455,7 @@ static struct agp_bridge_driver intel_810_driver = {
.agp_type_to_mask_type = agp_generic_type_to_mask_type, .agp_type_to_mask_type = agp_generic_type_to_mask_type,
}; };
static struct agp_bridge_driver intel_815_driver = { static const struct agp_bridge_driver intel_815_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = intel_815_sizes, .aperture_sizes = intel_815_sizes,
.size_type = U8_APER_SIZE, .size_type = U8_APER_SIZE,
...@@ -1479,7 +1479,7 @@ static struct agp_bridge_driver intel_815_driver = { ...@@ -1479,7 +1479,7 @@ static struct agp_bridge_driver intel_815_driver = {
.agp_type_to_mask_type = agp_generic_type_to_mask_type, .agp_type_to_mask_type = agp_generic_type_to_mask_type,
}; };
static struct agp_bridge_driver intel_830_driver = { static const struct agp_bridge_driver intel_830_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = intel_i830_sizes, .aperture_sizes = intel_i830_sizes,
.size_type = FIXED_APER_SIZE, .size_type = FIXED_APER_SIZE,
...@@ -1504,7 +1504,7 @@ static struct agp_bridge_driver intel_830_driver = { ...@@ -1504,7 +1504,7 @@ static struct agp_bridge_driver intel_830_driver = {
.agp_type_to_mask_type = intel_i830_type_to_mask_type, .agp_type_to_mask_type = intel_i830_type_to_mask_type,
}; };
static struct agp_bridge_driver intel_820_driver = { static const struct agp_bridge_driver intel_820_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = intel_8xx_sizes, .aperture_sizes = intel_8xx_sizes,
.size_type = U8_APER_SIZE, .size_type = U8_APER_SIZE,
...@@ -1528,7 +1528,7 @@ static struct agp_bridge_driver intel_820_driver = { ...@@ -1528,7 +1528,7 @@ static struct agp_bridge_driver intel_820_driver = {
.agp_type_to_mask_type = agp_generic_type_to_mask_type, .agp_type_to_mask_type = agp_generic_type_to_mask_type,
}; };
static struct agp_bridge_driver intel_830mp_driver = { static const struct agp_bridge_driver intel_830mp_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = intel_830mp_sizes, .aperture_sizes = intel_830mp_sizes,
.size_type = U8_APER_SIZE, .size_type = U8_APER_SIZE,
...@@ -1552,7 +1552,7 @@ static struct agp_bridge_driver intel_830mp_driver = { ...@@ -1552,7 +1552,7 @@ static struct agp_bridge_driver intel_830mp_driver = {
.agp_type_to_mask_type = agp_generic_type_to_mask_type, .agp_type_to_mask_type = agp_generic_type_to_mask_type,
}; };
static struct agp_bridge_driver intel_840_driver = { static const struct agp_bridge_driver intel_840_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = intel_8xx_sizes, .aperture_sizes = intel_8xx_sizes,
.size_type = U8_APER_SIZE, .size_type = U8_APER_SIZE,
...@@ -1576,7 +1576,7 @@ static struct agp_bridge_driver intel_840_driver = { ...@@ -1576,7 +1576,7 @@ static struct agp_bridge_driver intel_840_driver = {
.agp_type_to_mask_type = agp_generic_type_to_mask_type, .agp_type_to_mask_type = agp_generic_type_to_mask_type,
}; };
static struct agp_bridge_driver intel_845_driver = { static const struct agp_bridge_driver intel_845_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = intel_8xx_sizes, .aperture_sizes = intel_8xx_sizes,
.size_type = U8_APER_SIZE, .size_type = U8_APER_SIZE,
...@@ -1600,7 +1600,7 @@ static struct agp_bridge_driver intel_845_driver = { ...@@ -1600,7 +1600,7 @@ static struct agp_bridge_driver intel_845_driver = {
.agp_type_to_mask_type = agp_generic_type_to_mask_type, .agp_type_to_mask_type = agp_generic_type_to_mask_type,
}; };
static struct agp_bridge_driver intel_850_driver = { static const struct agp_bridge_driver intel_850_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = intel_8xx_sizes, .aperture_sizes = intel_8xx_sizes,
.size_type = U8_APER_SIZE, .size_type = U8_APER_SIZE,
...@@ -1624,7 +1624,7 @@ static struct agp_bridge_driver intel_850_driver = { ...@@ -1624,7 +1624,7 @@ static struct agp_bridge_driver intel_850_driver = {
.agp_type_to_mask_type = agp_generic_type_to_mask_type, .agp_type_to_mask_type = agp_generic_type_to_mask_type,
}; };
static struct agp_bridge_driver intel_860_driver = { static const struct agp_bridge_driver intel_860_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = intel_8xx_sizes, .aperture_sizes = intel_8xx_sizes,
.size_type = U8_APER_SIZE, .size_type = U8_APER_SIZE,
...@@ -1648,7 +1648,7 @@ static struct agp_bridge_driver intel_860_driver = { ...@@ -1648,7 +1648,7 @@ static struct agp_bridge_driver intel_860_driver = {
.agp_type_to_mask_type = agp_generic_type_to_mask_type, .agp_type_to_mask_type = agp_generic_type_to_mask_type,
}; };
static struct agp_bridge_driver intel_915_driver = { static const struct agp_bridge_driver intel_915_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = intel_i830_sizes, .aperture_sizes = intel_i830_sizes,
.size_type = FIXED_APER_SIZE, .size_type = FIXED_APER_SIZE,
...@@ -1673,7 +1673,7 @@ static struct agp_bridge_driver intel_915_driver = { ...@@ -1673,7 +1673,7 @@ static struct agp_bridge_driver intel_915_driver = {
.agp_type_to_mask_type = intel_i830_type_to_mask_type, .agp_type_to_mask_type = intel_i830_type_to_mask_type,
}; };
static struct agp_bridge_driver intel_i965_driver = { static const struct agp_bridge_driver intel_i965_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = intel_i830_sizes, .aperture_sizes = intel_i830_sizes,
.size_type = FIXED_APER_SIZE, .size_type = FIXED_APER_SIZE,
...@@ -1698,7 +1698,7 @@ static struct agp_bridge_driver intel_i965_driver = { ...@@ -1698,7 +1698,7 @@ static struct agp_bridge_driver intel_i965_driver = {
.agp_type_to_mask_type = intel_i830_type_to_mask_type, .agp_type_to_mask_type = intel_i830_type_to_mask_type,
}; };
static struct agp_bridge_driver intel_7505_driver = { static const struct agp_bridge_driver intel_7505_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = intel_8xx_sizes, .aperture_sizes = intel_8xx_sizes,
.size_type = U8_APER_SIZE, .size_type = U8_APER_SIZE,
......
...@@ -272,7 +272,7 @@ static void nvidia_tlbflush(struct agp_memory *mem) ...@@ -272,7 +272,7 @@ static void nvidia_tlbflush(struct agp_memory *mem)
} }
static struct aper_size_info_8 nvidia_generic_sizes[5] = static const struct aper_size_info_8 nvidia_generic_sizes[5] =
{ {
{512, 131072, 7, 0}, {512, 131072, 7, 0},
{256, 65536, 6, 8}, {256, 65536, 6, 8},
...@@ -283,13 +283,13 @@ static struct aper_size_info_8 nvidia_generic_sizes[5] = ...@@ -283,13 +283,13 @@ static struct aper_size_info_8 nvidia_generic_sizes[5] =
}; };
static struct gatt_mask nvidia_generic_masks[] = static const struct gatt_mask nvidia_generic_masks[] =
{ {
{ .mask = 1, .type = 0} { .mask = 1, .type = 0}
}; };
static struct agp_bridge_driver nvidia_driver = { static const struct agp_bridge_driver nvidia_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = nvidia_generic_sizes, .aperture_sizes = nvidia_generic_sizes,
.size_type = U8_APER_SIZE, .size_type = U8_APER_SIZE,
......
...@@ -210,7 +210,7 @@ parisc_agp_enable(struct agp_bridge_data *bridge, u32 mode) ...@@ -210,7 +210,7 @@ parisc_agp_enable(struct agp_bridge_data *bridge, u32 mode)
agp_device_command(command, (mode & AGP8X_MODE) != 0); agp_device_command(command, (mode & AGP8X_MODE) != 0);
} }
struct agp_bridge_driver parisc_agp_driver = { struct const agp_bridge_driver parisc_agp_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.size_type = FIXED_APER_SIZE, .size_type = FIXED_APER_SIZE,
.configure = parisc_agp_configure, .configure = parisc_agp_configure,
......
...@@ -247,7 +247,7 @@ static struct agp_bridge_data *sgi_tioca_find_bridge(struct pci_dev *pdev) ...@@ -247,7 +247,7 @@ static struct agp_bridge_data *sgi_tioca_find_bridge(struct pci_dev *pdev)
return bridge; return bridge;
} }
struct agp_bridge_driver sgi_tioca_driver = { struct const agp_bridge_driver sgi_tioca_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.size_type = U16_APER_SIZE, .size_type = U16_APER_SIZE,
.configure = sgi_tioca_configure, .configure = sgi_tioca_configure,
......
...@@ -108,7 +108,7 @@ static void sis_delayed_enable(struct agp_bridge_data *bridge, u32 mode) ...@@ -108,7 +108,7 @@ static void sis_delayed_enable(struct agp_bridge_data *bridge, u32 mode)
} }
} }
static struct aper_size_info_8 sis_generic_sizes[7] = static const struct aper_size_info_8 sis_generic_sizes[7] =
{ {
{256, 65536, 6, 99}, {256, 65536, 6, 99},
{128, 32768, 5, 83}, {128, 32768, 5, 83},
......
...@@ -385,12 +385,12 @@ static int serverworks_remove_memory(struct agp_memory *mem, off_t pg_start, ...@@ -385,12 +385,12 @@ static int serverworks_remove_memory(struct agp_memory *mem, off_t pg_start,
return 0; return 0;
} }
static struct gatt_mask serverworks_masks[] = static const struct gatt_mask serverworks_masks[] =
{ {
{.mask = 1, .type = 0} {.mask = 1, .type = 0}
}; };
static struct aper_size_info_lvl2 serverworks_sizes[7] = static const struct aper_size_info_lvl2 serverworks_sizes[7] =
{ {
{2048, 524288, 0x80000000}, {2048, 524288, 0x80000000},
{1024, 262144, 0xc0000000}, {1024, 262144, 0xc0000000},
...@@ -423,7 +423,7 @@ static void serverworks_agp_enable(struct agp_bridge_data *bridge, u32 mode) ...@@ -423,7 +423,7 @@ static void serverworks_agp_enable(struct agp_bridge_data *bridge, u32 mode)
agp_device_command(command, 0); agp_device_command(command, 0);
} }
static struct agp_bridge_driver sworks_driver = { static const struct agp_bridge_driver sworks_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = serverworks_sizes, .aperture_sizes = serverworks_sizes,
.size_type = LVL2_APER_SIZE, .size_type = LVL2_APER_SIZE,
......
...@@ -460,7 +460,7 @@ void null_cache_flush(void) ...@@ -460,7 +460,7 @@ void null_cache_flush(void)
/* Setup function */ /* Setup function */
static struct aper_size_info_32 uninorth_sizes[7] = static const struct aper_size_info_32 uninorth_sizes[7] =
{ {
#if 0 /* Not sure uninorth supports that high aperture sizes */ #if 0 /* Not sure uninorth supports that high aperture sizes */
{256, 65536, 6, 64}, {256, 65536, 6, 64},
...@@ -477,7 +477,7 @@ static struct aper_size_info_32 uninorth_sizes[7] = ...@@ -477,7 +477,7 @@ static struct aper_size_info_32 uninorth_sizes[7] =
* Not sure that u3 supports that high aperture sizes but it * Not sure that u3 supports that high aperture sizes but it
* would strange if it did not :) * would strange if it did not :)
*/ */
static struct aper_size_info_32 u3_sizes[8] = static const struct aper_size_info_32 u3_sizes[8] =
{ {
{512, 131072, 7, 128}, {512, 131072, 7, 128},
{256, 65536, 6, 64}, {256, 65536, 6, 64},
...@@ -489,7 +489,7 @@ static struct aper_size_info_32 u3_sizes[8] = ...@@ -489,7 +489,7 @@ static struct aper_size_info_32 u3_sizes[8] =
{4, 1024, 0, 1} {4, 1024, 0, 1}
}; };
struct agp_bridge_driver uninorth_agp_driver = { struct const agp_bridge_driver uninorth_agp_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = (void *)uninorth_sizes, .aperture_sizes = (void *)uninorth_sizes,
.size_type = U32_APER_SIZE, .size_type = U32_APER_SIZE,
...@@ -514,7 +514,7 @@ struct agp_bridge_driver uninorth_agp_driver = { ...@@ -514,7 +514,7 @@ struct agp_bridge_driver uninorth_agp_driver = {
.cant_use_aperture = 1, .cant_use_aperture = 1,
}; };
struct agp_bridge_driver u3_agp_driver = { struct const agp_bridge_driver u3_agp_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = (void *)u3_sizes, .aperture_sizes = (void *)u3_sizes,
.size_type = U32_APER_SIZE, .size_type = U32_APER_SIZE,
......
...@@ -89,7 +89,7 @@ static void via_tlbflush(struct agp_memory *mem) ...@@ -89,7 +89,7 @@ static void via_tlbflush(struct agp_memory *mem)
} }
static struct aper_size_info_8 via_generic_sizes[9] = static const struct aper_size_info_8 via_generic_sizes[9] =
{ {
{256, 65536, 6, 0}, {256, 65536, 6, 0},
{128, 32768, 5, 128}, {128, 32768, 5, 128},
...@@ -170,7 +170,7 @@ static void via_tlbflush_agp3(struct agp_memory *mem) ...@@ -170,7 +170,7 @@ static void via_tlbflush_agp3(struct agp_memory *mem)
} }
static struct agp_bridge_driver via_agp3_driver = { static const struct agp_bridge_driver via_agp3_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = agp3_generic_sizes, .aperture_sizes = agp3_generic_sizes,
.size_type = U8_APER_SIZE, .size_type = U8_APER_SIZE,
...@@ -194,7 +194,7 @@ static struct agp_bridge_driver via_agp3_driver = { ...@@ -194,7 +194,7 @@ static struct agp_bridge_driver via_agp3_driver = {
.agp_type_to_mask_type = agp_generic_type_to_mask_type, .agp_type_to_mask_type = agp_generic_type_to_mask_type,
}; };
static struct agp_bridge_driver via_driver = { static const struct agp_bridge_driver via_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = via_generic_sizes, .aperture_sizes = via_generic_sizes,
.size_type = U8_APER_SIZE, .size_type = U8_APER_SIZE,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment