From 0ea27d9f2fb5b998063323bff47ab87891ced9e2 Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Thu, 20 Oct 2005 15:12:16 -0700 Subject: [AGPGART] Replace kmalloc+memset's with kzalloc's Signed-off-by: Dave Jones --- drivers/char/agp/i460-agp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/char/agp/i460-agp.c') diff --git a/drivers/char/agp/i460-agp.c b/drivers/char/agp/i460-agp.c index 94943298c03..75acb960558 100644 --- a/drivers/char/agp/i460-agp.c +++ b/drivers/char/agp/i460-agp.c @@ -225,10 +225,9 @@ static int i460_configure (void) */ if (I460_IO_PAGE_SHIFT > PAGE_SHIFT) { size = current_size->num_entries * sizeof(i460.lp_desc[0]); - i460.lp_desc = kmalloc(size, GFP_KERNEL); + i460.lp_desc = kzalloc(size, GFP_KERNEL); if (!i460.lp_desc) return -ENOMEM; - memset(i460.lp_desc, 0, size); } return 0; } @@ -364,13 +363,12 @@ static int i460_alloc_large_page (struct lp_desc *lp) } map_size = ((I460_KPAGES_PER_IOPAGE + BITS_PER_LONG - 1) & -BITS_PER_LONG)/8; - lp->alloced_map = kmalloc(map_size, GFP_KERNEL); + lp->alloced_map = kzalloc(map_size, GFP_KERNEL); if (!lp->alloced_map) { free_pages((unsigned long) lpage, order); printk(KERN_ERR PFX "Out of memory, we're in trouble...\n"); return -ENOMEM; } - memset(lp->alloced_map, 0, map_size); lp->paddr = virt_to_gart(lpage); lp->refcount = 0; -- cgit v1.2.3 From ea248bcaadd5bafe4217357e1e511ac55639bcf3 Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Mon, 24 Oct 2005 20:20:11 -0700 Subject: [AGPGART] Set .owner field of struct pci_driver. From: Laurent Riffard This updates .owner field of struct pci_driver. This allows SYSFS to create the symlink from the driver to the module which provides it. $ tree /sys/bus/pci/drivers/agpgart-via/ /sys/bus/pci/drivers/agpgart-via/ |-- 0000:00:00.0 -> ../../../../devices/pci0000:00/0000:00:00.0 |-- bind |-- module -> ../../../../module/via_agp |-- new_id `-- unbind Signed-off-by: Laurent Riffard Signed-off-by: Dave Jones Signed-off-by: Andrew Morton --- drivers/char/agp/i460-agp.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/char/agp/i460-agp.c') diff --git a/drivers/char/agp/i460-agp.c b/drivers/char/agp/i460-agp.c index 75acb960558..e2c616ba583 100644 --- a/drivers/char/agp/i460-agp.c +++ b/drivers/char/agp/i460-agp.c @@ -615,6 +615,7 @@ static struct pci_device_id agp_intel_i460_pci_table[] = { MODULE_DEVICE_TABLE(pci, agp_intel_i460_pci_table); static struct pci_driver agp_intel_i460_pci_driver = { + .owner = THIS_MODULE, .name = "agpgart-intel-i460", .id_table = agp_intel_i460_pci_table, .probe = agp_intel_i460_probe, -- cgit v1.2.3