diff options
author | Dave Airlie <airlied@starflyer.(none)> | 2005-07-30 14:37:43 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2005-07-30 14:37:43 +1000 |
commit | bdf242eeb0f69567fe43eba93889d80ecacbfe94 (patch) | |
tree | dc402eeeb75fd51e92b4f4a63712c6e64ac4c2fb /drivers/acpi/toshiba_acpi.c | |
parent | 836cf0465c422ee6d654060edd7c620d9cf0c09c (diff) | |
parent | b0825488a642cadcf39709961dde61440cb0731c (diff) | |
download | op-kernel-dev-bdf242eeb0f69567fe43eba93889d80ecacbfe94.zip op-kernel-dev-bdf242eeb0f69567fe43eba93889d80ecacbfe94.tar.gz |
Merge ../linux-2.6/
Diffstat (limited to 'drivers/acpi/toshiba_acpi.c')
-rw-r--r-- | drivers/acpi/toshiba_acpi.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c index c84997c..73b1d8a 100644 --- a/drivers/acpi/toshiba_acpi.c +++ b/drivers/acpi/toshiba_acpi.c @@ -263,6 +263,9 @@ dispatch_write(struct file* file, const char __user * buffer, * destination so that sscanf can be used on it safely. */ tmp_buffer = kmalloc(count + 1, GFP_KERNEL); + if(!tmp_buffer) + return -ENOMEM; + if (copy_from_user(tmp_buffer, buffer, count)) { result = -EFAULT; } @@ -529,6 +532,11 @@ toshiba_acpi_init(void) if (acpi_disabled) return -ENODEV; + + if (!acpi_specific_hotkey_enabled){ + printk(MY_INFO "Using generic hotkey driver\n"); + return -ENODEV; + } /* simple device detection: look for HCI method */ if (is_valid_acpi_path(METHOD_HCI_1)) method_hci = METHOD_HCI_1; |