diff options
Diffstat (limited to 'drivers/char/agp/backend.c')
-rw-r--r-- | drivers/char/agp/backend.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c index 8c617ad7497f..cfa5a649dfe7 100644 --- a/drivers/char/agp/backend.c +++ b/drivers/char/agp/backend.c | |||
@@ -141,17 +141,17 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge) | |||
141 | bridge->version = &agp_current_version; | 141 | bridge->version = &agp_current_version; |
142 | 142 | ||
143 | if (bridge->driver->needs_scratch_page) { | 143 | if (bridge->driver->needs_scratch_page) { |
144 | void *addr = bridge->driver->agp_alloc_page(bridge); | 144 | struct page *page = bridge->driver->agp_alloc_page(bridge); |
145 | 145 | ||
146 | if (!addr) { | 146 | if (!page) { |
147 | dev_err(&bridge->dev->dev, | 147 | dev_err(&bridge->dev->dev, |
148 | "can't get memory for scratch page\n"); | 148 | "can't get memory for scratch page\n"); |
149 | return -ENOMEM; | 149 | return -ENOMEM; |
150 | } | 150 | } |
151 | 151 | ||
152 | bridge->scratch_page_real = virt_to_gart(addr); | 152 | bridge->scratch_page_real = phys_to_gart(page_to_phys(page)); |
153 | bridge->scratch_page = | 153 | bridge->scratch_page = |
154 | bridge->driver->mask_memory(bridge, bridge->scratch_page_real, 0); | 154 | bridge->driver->mask_memory(bridge, page, 0); |
155 | } | 155 | } |
156 | 156 | ||
157 | size_value = bridge->driver->fetch_size(); | 157 | size_value = bridge->driver->fetch_size(); |