aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/sworks-agp.c
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2006-02-28 00:54:25 -0500
committerDave Jones <davej@redhat.com>2006-02-28 00:54:25 -0500
commit6a92a4e0d201aea6d7c83f100d77310676b2e049 (patch)
tree89a17578d18b1cc3d653c75f00da6455e4bdcaa7 /drivers/char/agp/sworks-agp.c
parenta8b76b491510b7591c584838d0d7922f9ffe5c2c (diff)
[AGPGART] Lots of CodingStyle/whitespace cleanups.
Eliminate trailing whitespace. s/if(/if (/ s/for(/for (/ Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'drivers/char/agp/sworks-agp.c')
-rw-r--r--drivers/char/agp/sworks-agp.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/char/agp/sworks-agp.c b/drivers/char/agp/sworks-agp.c
index efef9999f1cf..4f2d7d99902f 100644
--- a/drivers/char/agp/sworks-agp.c
+++ b/drivers/char/agp/sworks-agp.c
@@ -64,7 +64,7 @@ static int serverworks_create_page_map(struct serverworks_page_map *page_map)
64 } 64 }
65 global_cache_flush(); 65 global_cache_flush();
66 66
67 for(i = 0; i < PAGE_SIZE / sizeof(unsigned long); i++) 67 for (i = 0; i < PAGE_SIZE / sizeof(unsigned long); i++)
68 writel(agp_bridge->scratch_page, page_map->remapped+i); 68 writel(agp_bridge->scratch_page, page_map->remapped+i);
69 69
70 return 0; 70 return 0;
@@ -84,7 +84,7 @@ static void serverworks_free_gatt_pages(void)
84 struct serverworks_page_map *entry; 84 struct serverworks_page_map *entry;
85 85
86 tables = serverworks_private.gatt_pages; 86 tables = serverworks_private.gatt_pages;
87 for(i = 0; i < serverworks_private.num_tables; i++) { 87 for (i = 0; i < serverworks_private.num_tables; i++) {
88 entry = tables[i]; 88 entry = tables[i];
89 if (entry != NULL) { 89 if (entry != NULL) {
90 if (entry->real != NULL) { 90 if (entry->real != NULL) {
@@ -103,7 +103,7 @@ static int serverworks_create_gatt_pages(int nr_tables)
103 int retval = 0; 103 int retval = 0;
104 int i; 104 int i;
105 105
106 tables = kzalloc((nr_tables + 1) * sizeof(struct serverworks_page_map *), 106 tables = kzalloc((nr_tables + 1) * sizeof(struct serverworks_page_map *),
107 GFP_KERNEL); 107 GFP_KERNEL);
108 if (tables == NULL) 108 if (tables == NULL)
109 return -ENOMEM; 109 return -ENOMEM;
@@ -161,7 +161,7 @@ static int serverworks_create_gatt_table(struct agp_bridge_data *bridge)
161 return retval; 161 return retval;
162 } 162 }
163 /* Create a fake scratch directory */ 163 /* Create a fake scratch directory */
164 for(i = 0; i < 1024; i++) { 164 for (i = 0; i < 1024; i++) {
165 writel(agp_bridge->scratch_page, serverworks_private.scratch_dir.remapped+i); 165 writel(agp_bridge->scratch_page, serverworks_private.scratch_dir.remapped+i);
166 writel(virt_to_gart(serverworks_private.scratch_dir.real) | 1, page_dir.remapped+i); 166 writel(virt_to_gart(serverworks_private.scratch_dir.real) | 1, page_dir.remapped+i);
167 } 167 }
@@ -185,9 +185,8 @@ static int serverworks_create_gatt_table(struct agp_bridge_data *bridge)
185 pci_read_config_dword(agp_bridge->dev,serverworks_private.gart_addr_ofs,&temp); 185 pci_read_config_dword(agp_bridge->dev,serverworks_private.gart_addr_ofs,&temp);
186 agp_bridge->gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK); 186 agp_bridge->gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK);
187 187
188 /* Calculate the agp offset */ 188 /* Calculate the agp offset */
189 189 for (i = 0; i < value->num_entries / 1024; i++)
190 for(i = 0; i < value->num_entries / 1024; i++)
191 writel(virt_to_gart(serverworks_private.gatt_pages[i]->real)|1, page_dir.remapped+i); 190 writel(virt_to_gart(serverworks_private.gatt_pages[i]->real)|1, page_dir.remapped+i);
192 191
193 return 0; 192 return 0;
@@ -196,7 +195,7 @@ static int serverworks_create_gatt_table(struct agp_bridge_data *bridge)
196static int serverworks_free_gatt_table(struct agp_bridge_data *bridge) 195static int serverworks_free_gatt_table(struct agp_bridge_data *bridge)
197{ 196{
198 struct serverworks_page_map page_dir; 197 struct serverworks_page_map page_dir;
199 198
200 page_dir.real = (unsigned long *)agp_bridge->gatt_table_real; 199 page_dir.real = (unsigned long *)agp_bridge->gatt_table_real;
201 page_dir.remapped = (unsigned long __iomem *)agp_bridge->gatt_table; 200 page_dir.remapped = (unsigned long __iomem *)agp_bridge->gatt_table;
202 201