diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-03-06 16:48:40 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-03-20 04:14:19 -0500 |
commit | 9132983ae140a8ca81e95e081d5a4c0dd7a7f670 (patch) | |
tree | f3aec20b1bb5a2cc111bbbf6775a0f8d84d28994 /arch/sparc64/kernel/pci_common.c | |
parent | f7c00338cfeef125032aa12aa8ebeacf9e117e81 (diff) |
[SPARC64]: kzalloc() conversion
this patch converts arch/sparc64 to kzalloc usage.
Crosscompile tested with allyesconfig.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/pci_common.c')
-rw-r--r-- | arch/sparc64/kernel/pci_common.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/sparc64/kernel/pci_common.c b/arch/sparc64/kernel/pci_common.c index 1448294a2379..33dedb1aacd4 100644 --- a/arch/sparc64/kernel/pci_common.c +++ b/arch/sparc64/kernel/pci_common.c | |||
@@ -977,33 +977,30 @@ void pci_register_legacy_regions(struct resource *io_res, | |||
977 | struct resource *p; | 977 | struct resource *p; |
978 | 978 | ||
979 | /* VGA Video RAM. */ | 979 | /* VGA Video RAM. */ |
980 | p = kmalloc(sizeof(*p), GFP_KERNEL); | 980 | p = kzalloc(sizeof(*p), GFP_KERNEL); |
981 | if (!p) | 981 | if (!p) |
982 | return; | 982 | return; |
983 | 983 | ||
984 | memset(p, 0, sizeof(*p)); | ||
985 | p->name = "Video RAM area"; | 984 | p->name = "Video RAM area"; |
986 | p->start = mem_res->start + 0xa0000UL; | 985 | p->start = mem_res->start + 0xa0000UL; |
987 | p->end = p->start + 0x1ffffUL; | 986 | p->end = p->start + 0x1ffffUL; |
988 | p->flags = IORESOURCE_BUSY; | 987 | p->flags = IORESOURCE_BUSY; |
989 | request_resource(mem_res, p); | 988 | request_resource(mem_res, p); |
990 | 989 | ||
991 | p = kmalloc(sizeof(*p), GFP_KERNEL); | 990 | p = kzalloc(sizeof(*p), GFP_KERNEL); |
992 | if (!p) | 991 | if (!p) |
993 | return; | 992 | return; |
994 | 993 | ||
995 | memset(p, 0, sizeof(*p)); | ||
996 | p->name = "System ROM"; | 994 | p->name = "System ROM"; |
997 | p->start = mem_res->start + 0xf0000UL; | 995 | p->start = mem_res->start + 0xf0000UL; |
998 | p->end = p->start + 0xffffUL; | 996 | p->end = p->start + 0xffffUL; |
999 | p->flags = IORESOURCE_BUSY; | 997 | p->flags = IORESOURCE_BUSY; |
1000 | request_resource(mem_res, p); | 998 | request_resource(mem_res, p); |
1001 | 999 | ||
1002 | p = kmalloc(sizeof(*p), GFP_KERNEL); | 1000 | p = kzalloc(sizeof(*p), GFP_KERNEL); |
1003 | if (!p) | 1001 | if (!p) |
1004 | return; | 1002 | return; |
1005 | 1003 | ||
1006 | memset(p, 0, sizeof(*p)); | ||
1007 | p->name = "Video ROM"; | 1004 | p->name = "Video ROM"; |
1008 | p->start = mem_res->start + 0xc0000UL; | 1005 | p->start = mem_res->start + 0xc0000UL; |
1009 | p->end = p->start + 0x7fffUL; | 1006 | p->end = p->start + 0x7fffUL; |