[AGPGART] Remove pointless typedef in ati-agp
This seems to exist just to save people typing 'struct' a few times, and doesn't provide any additional value. Signed-off-by: Dave Jones <davej@redhat.com>
This commit is contained in:
parent
c30efbaeaa
commit
87a17f31a3
@ -41,18 +41,18 @@ static struct gatt_mask ati_generic_masks[] =
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
typedef struct _ati_page_map {
|
struct ati_page_map {
|
||||||
unsigned long *real;
|
unsigned long *real;
|
||||||
unsigned long __iomem *remapped;
|
unsigned long __iomem *remapped;
|
||||||
} ati_page_map;
|
};
|
||||||
|
|
||||||
static struct _ati_generic_private {
|
static struct _ati_generic_private {
|
||||||
volatile u8 __iomem *registers;
|
volatile u8 __iomem *registers;
|
||||||
ati_page_map **gatt_pages;
|
struct ati_page_map **gatt_pages;
|
||||||
int num_tables;
|
int num_tables;
|
||||||
} ati_generic_private;
|
} ati_generic_private;
|
||||||
|
|
||||||
static int ati_create_page_map(ati_page_map *page_map)
|
static int ati_create_page_map(struct ati_page_map *page_map)
|
||||||
{
|
{
|
||||||
int i, err = 0;
|
int i, err = 0;
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ static int ati_create_page_map(ati_page_map *page_map)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void ati_free_page_map(ati_page_map *page_map)
|
static void ati_free_page_map(struct ati_page_map *page_map)
|
||||||
{
|
{
|
||||||
unmap_page_from_agp(virt_to_page(page_map->real));
|
unmap_page_from_agp(virt_to_page(page_map->real));
|
||||||
iounmap(page_map->remapped);
|
iounmap(page_map->remapped);
|
||||||
@ -94,8 +94,8 @@ static void ati_free_page_map(ati_page_map *page_map)
|
|||||||
static void ati_free_gatt_pages(void)
|
static void ati_free_gatt_pages(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
ati_page_map **tables;
|
struct ati_page_map **tables;
|
||||||
ati_page_map *entry;
|
struct ati_page_map *entry;
|
||||||
|
|
||||||
tables = ati_generic_private.gatt_pages;
|
tables = ati_generic_private.gatt_pages;
|
||||||
for (i = 0; i < ati_generic_private.num_tables; i++) {
|
for (i = 0; i < ati_generic_private.num_tables; i++) {
|
||||||
@ -112,17 +112,17 @@ static void ati_free_gatt_pages(void)
|
|||||||
|
|
||||||
static int ati_create_gatt_pages(int nr_tables)
|
static int ati_create_gatt_pages(int nr_tables)
|
||||||
{
|
{
|
||||||
ati_page_map **tables;
|
struct ati_page_map **tables;
|
||||||
ati_page_map *entry;
|
struct ati_page_map *entry;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
tables = kzalloc((nr_tables + 1) * sizeof(ati_page_map *),GFP_KERNEL);
|
tables = kzalloc((nr_tables + 1) * sizeof(struct ati_page_map *),GFP_KERNEL);
|
||||||
if (tables == NULL)
|
if (tables == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
for (i = 0; i < nr_tables; i++) {
|
for (i = 0; i < nr_tables; i++) {
|
||||||
entry = kzalloc(sizeof(ati_page_map), GFP_KERNEL);
|
entry = kzalloc(sizeof(struct ati_page_map), GFP_KERNEL);
|
||||||
if (entry == NULL) {
|
if (entry == NULL) {
|
||||||
while (i>0) {
|
while (i>0) {
|
||||||
kfree (tables[i-1]);
|
kfree (tables[i-1]);
|
||||||
@ -340,7 +340,7 @@ static int ati_remove_memory(struct agp_memory * mem, off_t pg_start,
|
|||||||
static int ati_create_gatt_table(struct agp_bridge_data *bridge)
|
static int ati_create_gatt_table(struct agp_bridge_data *bridge)
|
||||||
{
|
{
|
||||||
struct aper_size_info_lvl2 *value;
|
struct aper_size_info_lvl2 *value;
|
||||||
ati_page_map page_dir;
|
struct ati_page_map page_dir;
|
||||||
unsigned long addr;
|
unsigned long addr;
|
||||||
int retval;
|
int retval;
|
||||||
u32 temp;
|
u32 temp;
|
||||||
@ -400,7 +400,7 @@ static int ati_create_gatt_table(struct agp_bridge_data *bridge)
|
|||||||
|
|
||||||
static int ati_free_gatt_table(struct agp_bridge_data *bridge)
|
static int ati_free_gatt_table(struct agp_bridge_data *bridge)
|
||||||
{
|
{
|
||||||
ati_page_map page_dir;
|
struct ati_page_map page_dir;
|
||||||
|
|
||||||
page_dir.real = (unsigned long *)agp_bridge->gatt_table_real;
|
page_dir.real = (unsigned long *)agp_bridge->gatt_table_real;
|
||||||
page_dir.remapped = (unsigned long __iomem *)agp_bridge->gatt_table;
|
page_dir.remapped = (unsigned long __iomem *)agp_bridge->gatt_table;
|
||||||
|
Loading…
Reference in New Issue
Block a user