diff options
author | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-22 21:46:56 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-22 21:46:56 -0500 |
commit | 18ed1c051317ac3a685120cead2adb192b802347 (patch) | |
tree | c08a9147119a6cb69114166c7107f6b0bba6e2ab /drivers/acpi/i2c_ec.c | |
parent | dab6df63086762629936e8b89a5984bae39724f6 (diff) | |
parent | 36bcbec7ce21e2e8b3143b11a05747330abeca70 (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (68 commits)
ACPI: replace kmalloc+memset with kzalloc
ACPI: Add support for acpi_load_table/acpi_unload_table_id
fbdev: update after backlight argument change
ACPI: video: Add dev argument for backlight_device_register
ACPI: Implement acpi_video_get_next_level()
ACPI: Kconfig - depend on PM rather than selecting it
ACPI: fix NULL check in drivers/acpi/osl.c
ACPI: make drivers/acpi/ec.c:ec_ecdt static
ACPI: prevent processor module from loading on failures
ACPI: fix single linked list manipulation
ACPI: ibm_acpi: allow clean removal
ACPI: fix git automerge failure
ACPI: ibm_acpi: respond to workqueue update
ACPI: dock: add uevent to indicate change in device status
ACPI: ec: Lindent once again
ACPI: ec: Change #define to enums there possible.
ACPI: ec: Style changes.
ACPI: ec: Acquire Global Lock under EC mutex.
ACPI: ec: Drop udelay() from poll mode. Loop by reading status field instead.
ACPI: ec: Rename gpe_bit to gpe
...
Diffstat (limited to 'drivers/acpi/i2c_ec.c')
-rw-r--r-- | drivers/acpi/i2c_ec.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/acpi/i2c_ec.c b/drivers/acpi/i2c_ec.c index 6342e612c203..8338be0990bc 100644 --- a/drivers/acpi/i2c_ec.c +++ b/drivers/acpi/i2c_ec.c | |||
@@ -309,18 +309,16 @@ static int acpi_ec_hc_add(struct acpi_device *device) | |||
309 | return -EINVAL; | 309 | return -EINVAL; |
310 | } | 310 | } |
311 | 311 | ||
312 | ec_hc = kmalloc(sizeof(struct acpi_ec_hc), GFP_KERNEL); | 312 | ec_hc = kzalloc(sizeof(struct acpi_ec_hc), GFP_KERNEL); |
313 | if (!ec_hc) { | 313 | if (!ec_hc) { |
314 | return -ENOMEM; | 314 | return -ENOMEM; |
315 | } | 315 | } |
316 | memset(ec_hc, 0, sizeof(struct acpi_ec_hc)); | ||
317 | 316 | ||
318 | smbus = kmalloc(sizeof(struct acpi_ec_smbus), GFP_KERNEL); | 317 | smbus = kzalloc(sizeof(struct acpi_ec_smbus), GFP_KERNEL); |
319 | if (!smbus) { | 318 | if (!smbus) { |
320 | kfree(ec_hc); | 319 | kfree(ec_hc); |
321 | return -ENOMEM; | 320 | return -ENOMEM; |
322 | } | 321 | } |
323 | memset(smbus, 0, sizeof(struct acpi_ec_smbus)); | ||
324 | 322 | ||
325 | ec_hc->handle = device->handle; | 323 | ec_hc->handle = device->handle; |
326 | strcpy(acpi_device_name(device), ACPI_EC_HC_DEVICE_NAME); | 324 | strcpy(acpi_device_name(device), ACPI_EC_HC_DEVICE_NAME); |
@@ -393,7 +391,7 @@ static void __exit acpi_ec_hc_exit(void) | |||
393 | 391 | ||
394 | struct acpi_ec_hc *acpi_get_ec_hc(struct acpi_device *device) | 392 | struct acpi_ec_hc *acpi_get_ec_hc(struct acpi_device *device) |
395 | { | 393 | { |
396 | return ((struct acpi_ec_hc *)acpi_driver_data(device->parent)); | 394 | return acpi_driver_data(device->parent); |
397 | } | 395 | } |
398 | 396 | ||
399 | EXPORT_SYMBOL(acpi_get_ec_hc); | 397 | EXPORT_SYMBOL(acpi_get_ec_hc); |