aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/i460-agp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/agp/i460-agp.c')
-rw-r--r--drivers/char/agp/i460-agp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/char/agp/i460-agp.c b/drivers/char/agp/i460-agp.c
index a2d9e5e48bbe..58944cd271ea 100644
--- a/drivers/char/agp/i460-agp.c
+++ b/drivers/char/agp/i460-agp.c
@@ -227,10 +227,9 @@ static int i460_configure (void)
227 */ 227 */
228 if (I460_IO_PAGE_SHIFT > PAGE_SHIFT) { 228 if (I460_IO_PAGE_SHIFT > PAGE_SHIFT) {
229 size = current_size->num_entries * sizeof(i460.lp_desc[0]); 229 size = current_size->num_entries * sizeof(i460.lp_desc[0]);
230 i460.lp_desc = kmalloc(size, GFP_KERNEL); 230 i460.lp_desc = kzalloc(size, GFP_KERNEL);
231 if (!i460.lp_desc) 231 if (!i460.lp_desc)
232 return -ENOMEM; 232 return -ENOMEM;
233 memset(i460.lp_desc, 0, size);
234 } 233 }
235 return 0; 234 return 0;
236} 235}
@@ -366,13 +365,12 @@ static int i460_alloc_large_page (struct lp_desc *lp)
366 } 365 }
367 366
368 map_size = ((I460_KPAGES_PER_IOPAGE + BITS_PER_LONG - 1) & -BITS_PER_LONG)/8; 367 map_size = ((I460_KPAGES_PER_IOPAGE + BITS_PER_LONG - 1) & -BITS_PER_LONG)/8;
369 lp->alloced_map = kmalloc(map_size, GFP_KERNEL); 368 lp->alloced_map = kzalloc(map_size, GFP_KERNEL);
370 if (!lp->alloced_map) { 369 if (!lp->alloced_map) {
371 free_pages((unsigned long) lpage, order); 370 free_pages((unsigned long) lpage, order);
372 printk(KERN_ERR PFX "Out of memory, we're in trouble...\n"); 371 printk(KERN_ERR PFX "Out of memory, we're in trouble...\n");
373 return -ENOMEM; 372 return -ENOMEM;
374 } 373 }
375 memset(lp->alloced_map, 0, map_size);
376 374
377 lp->paddr = virt_to_gart(lpage); 375 lp->paddr = virt_to_gart(lpage);
378 lp->refcount = 0; 376 lp->refcount = 0;
@@ -619,6 +617,7 @@ static struct pci_device_id agp_intel_i460_pci_table[] = {
619MODULE_DEVICE_TABLE(pci, agp_intel_i460_pci_table); 617MODULE_DEVICE_TABLE(pci, agp_intel_i460_pci_table);
620 618
621static struct pci_driver agp_intel_i460_pci_driver = { 619static struct pci_driver agp_intel_i460_pci_driver = {
620 .owner = THIS_MODULE,
622 .name = "agpgart-intel-i460", 621 .name = "agpgart-intel-i460",
623 .id_table = agp_intel_i460_pci_table, 622 .id_table = agp_intel_i460_pci_table,
624 .probe = agp_intel_i460_probe, 623 .probe = agp_intel_i460_probe,