aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/backend.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/agp/backend.c')
-rw-r--r--drivers/char/agp/backend.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c
index 1ec87104e68..9626d3bda09 100644
--- a/drivers/char/agp/backend.c
+++ b/drivers/char/agp/backend.c
@@ -144,7 +144,8 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
144 void *addr = bridge->driver->agp_alloc_page(bridge); 144 void *addr = bridge->driver->agp_alloc_page(bridge);
145 145
146 if (!addr) { 146 if (!addr) {
147 printk(KERN_ERR PFX "unable to get memory for scratch page.\n"); 147 dev_err(&bridge->dev->dev,
148 "can't get memory for scratch page\n");
148 return -ENOMEM; 149 return -ENOMEM;
149 } 150 }
150 151
@@ -155,13 +156,13 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
155 156
156 size_value = bridge->driver->fetch_size(); 157 size_value = bridge->driver->fetch_size();
157 if (size_value == 0) { 158 if (size_value == 0) {
158 printk(KERN_ERR PFX "unable to determine aperture size.\n"); 159 dev_err(&bridge->dev->dev, "can't determine aperture size\n");
159 rc = -EINVAL; 160 rc = -EINVAL;
160 goto err_out; 161 goto err_out;
161 } 162 }
162 if (bridge->driver->create_gatt_table(bridge)) { 163 if (bridge->driver->create_gatt_table(bridge)) {
163 printk(KERN_ERR PFX 164 dev_err(&bridge->dev->dev,
164 "unable to get memory for graphics translation table.\n"); 165 "can't get memory for graphics translation table\n");
165 rc = -ENOMEM; 166 rc = -ENOMEM;
166 goto err_out; 167 goto err_out;
167 } 168 }
@@ -169,7 +170,8 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
169 170
170 bridge->key_list = vmalloc(PAGE_SIZE * 4); 171 bridge->key_list = vmalloc(PAGE_SIZE * 4);
171 if (bridge->key_list == NULL) { 172 if (bridge->key_list == NULL) {
172 printk(KERN_ERR PFX "error allocating memory for key lists.\n"); 173 dev_err(&bridge->dev->dev,
174 "can't allocate memory for key lists\n");
173 rc = -ENOMEM; 175 rc = -ENOMEM;
174 goto err_out; 176 goto err_out;
175 } 177 }
@@ -179,7 +181,7 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
179 memset(bridge->key_list, 0, PAGE_SIZE * 4); 181 memset(bridge->key_list, 0, PAGE_SIZE * 4);
180 182
181 if (bridge->driver->configure()) { 183 if (bridge->driver->configure()) {
182 printk(KERN_ERR PFX "error configuring host chipset.\n"); 184 dev_err(&bridge->dev->dev, "error configuring host chipset\n");
183 rc = -EINVAL; 185 rc = -EINVAL;
184 goto err_out; 186 goto err_out;
185 } 187 }
@@ -269,25 +271,27 @@ int agp_add_bridge(struct agp_bridge_data *bridge)
269 271
270 /* Grab reference on the chipset driver. */ 272 /* Grab reference on the chipset driver. */
271 if (!try_module_get(bridge->driver->owner)) { 273 if (!try_module_get(bridge->driver->owner)) {
272 printk (KERN_INFO PFX "Couldn't lock chipset driver.\n"); 274 dev_info(&bridge->dev->dev, "can't lock chipset driver\n");
273 return -EINVAL; 275 return -EINVAL;
274 } 276 }
275 277
276 error = agp_backend_initialize(bridge); 278 error = agp_backend_initialize(bridge);
277 if (error) { 279 if (error) {
278 printk (KERN_INFO PFX "agp_backend_initialize() failed.\n"); 280 dev_info(&bridge->dev->dev,
281 "agp_backend_initialize() failed\n");
279 goto err_out; 282 goto err_out;
280 } 283 }
281 284
282 if (list_empty(&agp_bridges)) { 285 if (list_empty(&agp_bridges)) {
283 error = agp_frontend_initialize(); 286 error = agp_frontend_initialize();
284 if (error) { 287 if (error) {
285 printk (KERN_INFO PFX "agp_frontend_initialize() failed.\n"); 288 dev_info(&bridge->dev->dev,
289 "agp_frontend_initialize() failed\n");
286 goto frontend_err; 290 goto frontend_err;
287 } 291 }
288 292
289 printk(KERN_INFO PFX "AGP aperture is %dM @ 0x%lx\n", 293 dev_info(&bridge->dev->dev, "AGP aperture is %dM @ 0x%lx\n",
290 bridge->driver->fetch_size(), bridge->gart_bus_addr); 294 bridge->driver->fetch_size(), bridge->gart_bus_addr);
291 295
292 } 296 }
293 297