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_sabre.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_sabre.c')
-rw-r--r-- | arch/sparc64/kernel/pci_sabre.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/sparc64/kernel/pci_sabre.c b/arch/sparc64/kernel/pci_sabre.c index da8e1364194f..5ddc92931976 100644 --- a/arch/sparc64/kernel/pci_sabre.c +++ b/arch/sparc64/kernel/pci_sabre.c | |||
@@ -1167,7 +1167,7 @@ static void apb_init(struct pci_controller_info *p, struct pci_bus *sabre_bus) | |||
1167 | 1167 | ||
1168 | static struct pcidev_cookie *alloc_bridge_cookie(struct pci_pbm_info *pbm) | 1168 | static struct pcidev_cookie *alloc_bridge_cookie(struct pci_pbm_info *pbm) |
1169 | { | 1169 | { |
1170 | struct pcidev_cookie *cookie = kmalloc(sizeof(*cookie), GFP_KERNEL); | 1170 | struct pcidev_cookie *cookie = kzalloc(sizeof(*cookie), GFP_KERNEL); |
1171 | 1171 | ||
1172 | if (!cookie) { | 1172 | if (!cookie) { |
1173 | prom_printf("SABRE: Critical allocation failure.\n"); | 1173 | prom_printf("SABRE: Critical allocation failure.\n"); |
@@ -1175,7 +1175,6 @@ static struct pcidev_cookie *alloc_bridge_cookie(struct pci_pbm_info *pbm) | |||
1175 | } | 1175 | } |
1176 | 1176 | ||
1177 | /* All we care about is the PBM. */ | 1177 | /* All we care about is the PBM. */ |
1178 | memset(cookie, 0, sizeof(*cookie)); | ||
1179 | cookie->pbm = pbm; | 1178 | cookie->pbm = pbm; |
1180 | 1179 | ||
1181 | return cookie; | 1180 | return cookie; |
@@ -1556,19 +1555,17 @@ void sabre_init(int pnode, char *model_name) | |||
1556 | } | 1555 | } |
1557 | } | 1556 | } |
1558 | 1557 | ||
1559 | p = kmalloc(sizeof(*p), GFP_ATOMIC); | 1558 | p = kzalloc(sizeof(*p), GFP_ATOMIC); |
1560 | if (!p) { | 1559 | if (!p) { |
1561 | prom_printf("SABRE: Error, kmalloc(pci_controller_info) failed.\n"); | 1560 | prom_printf("SABRE: Error, kmalloc(pci_controller_info) failed.\n"); |
1562 | prom_halt(); | 1561 | prom_halt(); |
1563 | } | 1562 | } |
1564 | memset(p, 0, sizeof(*p)); | ||
1565 | 1563 | ||
1566 | iommu = kmalloc(sizeof(*iommu), GFP_ATOMIC); | 1564 | iommu = kzalloc(sizeof(*iommu), GFP_ATOMIC); |
1567 | if (!iommu) { | 1565 | if (!iommu) { |
1568 | prom_printf("SABRE: Error, kmalloc(pci_iommu) failed.\n"); | 1566 | prom_printf("SABRE: Error, kmalloc(pci_iommu) failed.\n"); |
1569 | prom_halt(); | 1567 | prom_halt(); |
1570 | } | 1568 | } |
1571 | memset(iommu, 0, sizeof(*iommu)); | ||
1572 | p->pbm_A.iommu = p->pbm_B.iommu = iommu; | 1569 | p->pbm_A.iommu = p->pbm_B.iommu = iommu; |
1573 | 1570 | ||
1574 | upa_portid = prom_getintdefault(pnode, "upa-portid", 0xff); | 1571 | upa_portid = prom_getintdefault(pnode, "upa-portid", 0xff); |