mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
asus-acpi: Remove uneccesary acpi_disabled checks
acpi_bus_register_driver() already checks acpi_disabled, so acpi bus drivers don't need to. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
b7fab7a070
commit
5a4a9f6fd3
1 changed files with 4 additions and 8 deletions
|
@ -1416,21 +1416,17 @@ static int __init asus_acpi_init(void)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
if (acpi_disabled)
|
result = acpi_bus_register_driver(&asus_hotk_driver);
|
||||||
return -ENODEV;
|
if (result < 0)
|
||||||
|
return result;
|
||||||
|
|
||||||
asus_proc_dir = proc_mkdir(PROC_ASUS, acpi_root_dir);
|
asus_proc_dir = proc_mkdir(PROC_ASUS, acpi_root_dir);
|
||||||
if (!asus_proc_dir) {
|
if (!asus_proc_dir) {
|
||||||
printk(KERN_ERR "Asus ACPI: Unable to create /proc entry\n");
|
printk(KERN_ERR "Asus ACPI: Unable to create /proc entry\n");
|
||||||
|
acpi_bus_unregister_driver(&asus_hotk_driver);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = acpi_bus_register_driver(&asus_hotk_driver);
|
|
||||||
if (result < 0) {
|
|
||||||
remove_proc_entry(PROC_ASUS, acpi_root_dir);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is a bit of a kludge. We only want this module loaded
|
* This is a bit of a kludge. We only want this module loaded
|
||||||
* for ASUS systems, but there's currently no way to probe the
|
* for ASUS systems, but there's currently no way to probe the
|
||||||
|
|
Loading…
Add table
Reference in a new issue