summaryrefslogtreecommitdiff
path: root/drivers/pci/hotplug/ibmphp_res.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug/ibmphp_res.c')
-rw-r--r--drivers/pci/hotplug/ibmphp_res.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/pci/hotplug/ibmphp_res.c b/drivers/pci/hotplug/ibmphp_res.c
index 4a72ade2cddb..0294fd97e6db 100644
--- a/drivers/pci/hotplug/ibmphp_res.c
+++ b/drivers/pci/hotplug/ibmphp_res.c
@@ -41,7 +41,7 @@ static struct bus_node * __init alloc_error_bus(struct ebda_pci_rsrc *curr, u8 b
return NULL;
}
- newbus = kzalloc(sizeof(struct bus_node), GFP_KERNEL);
+ newbus = kzalloc_obj(struct bus_node);
if (!newbus)
return NULL;
@@ -62,7 +62,7 @@ static struct resource_node * __init alloc_resources(struct ebda_pci_rsrc *curr)
return NULL;
}
- rs = kzalloc(sizeof(struct resource_node), GFP_KERNEL);
+ rs = kzalloc_obj(struct resource_node);
if (!rs)
return NULL;
@@ -81,7 +81,7 @@ static int __init alloc_bus_range(struct bus_node **new_bus, struct range_node *
u8 num_ranges = 0;
if (first_bus) {
- newbus = kzalloc(sizeof(struct bus_node), GFP_KERNEL);
+ newbus = kzalloc_obj(struct bus_node);
if (!newbus)
return -ENOMEM;
@@ -101,7 +101,7 @@ static int __init alloc_bus_range(struct bus_node **new_bus, struct range_node *
}
}
- newrange = kzalloc(sizeof(struct range_node), GFP_KERNEL);
+ newrange = kzalloc_obj(struct range_node);
if (!newrange) {
if (first_bus)
kfree(newbus);
@@ -1687,7 +1687,7 @@ static int __init once_over(void)
bus_cur->firstPFMemFromMem = pfmem_cur;
- mem = kzalloc(sizeof(struct resource_node), GFP_KERNEL);
+ mem = kzalloc_obj(struct resource_node);
if (!mem)
return -ENOMEM;
@@ -1969,7 +1969,7 @@ static int __init update_bridge_ranges(struct bus_node **bus)
end_address |= (upper_io_end << 16);
if ((start_address) && (start_address <= end_address)) {
- range = kzalloc(sizeof(struct range_node), GFP_KERNEL);
+ range = kzalloc_obj(struct range_node);
if (!range)
return -ENOMEM;
@@ -1993,7 +1993,7 @@ static int __init update_bridge_ranges(struct bus_node **bus)
fix_resources(bus_sec);
if (ibmphp_find_resource(bus_cur, start_address, &io, IO)) {
- io = kzalloc(sizeof(struct resource_node), GFP_KERNEL);
+ io = kzalloc_obj(struct resource_node);
if (!io) {
kfree(range);
return -ENOMEM;
@@ -2016,7 +2016,7 @@ static int __init update_bridge_ranges(struct bus_node **bus)
if ((start_address) && (start_address <= end_address)) {
- range = kzalloc(sizeof(struct range_node), GFP_KERNEL);
+ range = kzalloc_obj(struct range_node);
if (!range)
return -ENOMEM;
@@ -2041,7 +2041,7 @@ static int __init update_bridge_ranges(struct bus_node **bus)
fix_resources(bus_sec);
if (ibmphp_find_resource(bus_cur, start_address, &mem, MEM)) {
- mem = kzalloc(sizeof(struct resource_node), GFP_KERNEL);
+ mem = kzalloc_obj(struct resource_node);
if (!mem) {
kfree(range);
return -ENOMEM;
@@ -2068,7 +2068,7 @@ static int __init update_bridge_ranges(struct bus_node **bus)
if ((start_address) && (start_address <= end_address)) {
- range = kzalloc(sizeof(struct range_node), GFP_KERNEL);
+ range = kzalloc_obj(struct range_node);
if (!range)
return -ENOMEM;
@@ -2092,7 +2092,7 @@ static int __init update_bridge_ranges(struct bus_node **bus)
fix_resources(bus_sec);
if (ibmphp_find_resource(bus_cur, start_address, &pfmem, PFMEM)) {
- pfmem = kzalloc(sizeof(struct resource_node), GFP_KERNEL);
+ pfmem = kzalloc_obj(struct resource_node);
if (!pfmem) {
kfree(range);
return -ENOMEM;