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_psycho.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_psycho.c')
-rw-r--r-- | arch/sparc64/kernel/pci_psycho.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/sparc64/kernel/pci_psycho.c b/arch/sparc64/kernel/pci_psycho.c index c03ed5f49d31..f7b16e49c28b 100644 --- a/arch/sparc64/kernel/pci_psycho.c +++ b/arch/sparc64/kernel/pci_psycho.c | |||
@@ -1164,7 +1164,7 @@ static void pbm_config_busmastering(struct pci_pbm_info *pbm) | |||
1164 | static void pbm_scan_bus(struct pci_controller_info *p, | 1164 | static void pbm_scan_bus(struct pci_controller_info *p, |
1165 | struct pci_pbm_info *pbm) | 1165 | struct pci_pbm_info *pbm) |
1166 | { | 1166 | { |
1167 | struct pcidev_cookie *cookie = kmalloc(sizeof(*cookie), GFP_KERNEL); | 1167 | struct pcidev_cookie *cookie = kzalloc(sizeof(*cookie), GFP_KERNEL); |
1168 | 1168 | ||
1169 | if (!cookie) { | 1169 | if (!cookie) { |
1170 | prom_printf("PSYCHO: Critical allocation failure.\n"); | 1170 | prom_printf("PSYCHO: Critical allocation failure.\n"); |
@@ -1172,7 +1172,6 @@ static void pbm_scan_bus(struct pci_controller_info *p, | |||
1172 | } | 1172 | } |
1173 | 1173 | ||
1174 | /* All we care about is the PBM. */ | 1174 | /* All we care about is the PBM. */ |
1175 | memset(cookie, 0, sizeof(*cookie)); | ||
1176 | cookie->pbm = pbm; | 1175 | cookie->pbm = pbm; |
1177 | 1176 | ||
1178 | pbm->pci_bus = pci_scan_bus(pbm->pci_first_busno, | 1177 | pbm->pci_bus = pci_scan_bus(pbm->pci_first_busno, |
@@ -1465,18 +1464,16 @@ void psycho_init(int node, char *model_name) | |||
1465 | } | 1464 | } |
1466 | } | 1465 | } |
1467 | 1466 | ||
1468 | p = kmalloc(sizeof(struct pci_controller_info), GFP_ATOMIC); | 1467 | p = kzalloc(sizeof(struct pci_controller_info), GFP_ATOMIC); |
1469 | if (!p) { | 1468 | if (!p) { |
1470 | prom_printf("PSYCHO: Fatal memory allocation error.\n"); | 1469 | prom_printf("PSYCHO: Fatal memory allocation error.\n"); |
1471 | prom_halt(); | 1470 | prom_halt(); |
1472 | } | 1471 | } |
1473 | memset(p, 0, sizeof(*p)); | 1472 | iommu = kzalloc(sizeof(struct pci_iommu), GFP_ATOMIC); |
1474 | iommu = kmalloc(sizeof(struct pci_iommu), GFP_ATOMIC); | ||
1475 | if (!iommu) { | 1473 | if (!iommu) { |
1476 | prom_printf("PSYCHO: Fatal memory allocation error.\n"); | 1474 | prom_printf("PSYCHO: Fatal memory allocation error.\n"); |
1477 | prom_halt(); | 1475 | prom_halt(); |
1478 | } | 1476 | } |
1479 | memset(iommu, 0, sizeof(*iommu)); | ||
1480 | p->pbm_A.iommu = p->pbm_B.iommu = iommu; | 1477 | p->pbm_A.iommu = p->pbm_B.iommu = iommu; |
1481 | 1478 | ||
1482 | p->next = pci_controller_root; | 1479 | p->next = pci_controller_root; |