diff options
author | Burman Yan <yan_952@hotmail.com> | 2006-12-19 15:56:11 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-12-20 16:54:54 -0500 |
commit | 36bcbec7ce21e2e8b3143b11a05747330abeca70 (patch) | |
tree | d9ace4d83a5013dbb3cd599e7bc4358ce4cdb980 /drivers/acpi/ibm_acpi.c | |
parent | 5b7b4119553dd7cc0bc200c0d1b1598e158eec9a (diff) |
ACPI: replace kmalloc+memset with kzalloc
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/ibm_acpi.c')
-rw-r--r-- | drivers/acpi/ibm_acpi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c index 130cc8c37e22..0e7682a88aa8 100644 --- a/drivers/acpi/ibm_acpi.c +++ b/drivers/acpi/ibm_acpi.c | |||
@@ -2516,13 +2516,12 @@ static int __init register_driver(struct ibm_struct *ibm) | |||
2516 | { | 2516 | { |
2517 | int ret; | 2517 | int ret; |
2518 | 2518 | ||
2519 | ibm->driver = kmalloc(sizeof(struct acpi_driver), GFP_KERNEL); | 2519 | ibm->driver = kzalloc(sizeof(struct acpi_driver), GFP_KERNEL); |
2520 | if (!ibm->driver) { | 2520 | if (!ibm->driver) { |
2521 | printk(IBM_ERR "kmalloc(ibm->driver) failed\n"); | 2521 | printk(IBM_ERR "kmalloc(ibm->driver) failed\n"); |
2522 | return -1; | 2522 | return -1; |
2523 | } | 2523 | } |
2524 | 2524 | ||
2525 | memset(ibm->driver, 0, sizeof(struct acpi_driver)); | ||
2526 | sprintf(ibm->driver->name, "%s_%s", IBM_NAME, ibm->name); | 2525 | sprintf(ibm->driver->name, "%s_%s", IBM_NAME, ibm->name); |
2527 | ibm->driver->ids = ibm->hid; | 2526 | ibm->driver->ids = ibm->hid; |
2528 | ibm->driver->ops.add = &ibm_device_add; | 2527 | ibm->driver->ops.add = &ibm_device_add; |