aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/acer-wmi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/acer-wmi.c')
-rw-r--r--drivers/misc/acer-wmi.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/misc/acer-wmi.c b/drivers/misc/acer-wmi.c
index b2d9878dc3f0..d8b0d326e452 100644
--- a/drivers/misc/acer-wmi.c
+++ b/drivers/misc/acer-wmi.c
@@ -192,6 +192,9 @@ static struct quirk_entry *quirks;
192 192
193static void set_quirks(void) 193static void set_quirks(void)
194{ 194{
195 if (!interface)
196 return;
197
195 if (quirks->mailled) 198 if (quirks->mailled)
196 interface->capability |= ACER_CAP_MAILLED; 199 interface->capability |= ACER_CAP_MAILLED;
197 200
@@ -1186,7 +1189,7 @@ static int create_debugfs(void)
1186 return 0; 1189 return 0;
1187 1190
1188error_debugfs: 1191error_debugfs:
1189 remove_debugfs(); 1192 remove_debugfs();
1190 return -ENOMEM; 1193 return -ENOMEM;
1191} 1194}
1192 1195
@@ -1237,6 +1240,8 @@ static int __init acer_wmi_init(void)
1237 return -ENODEV; 1240 return -ENODEV;
1238 } 1241 }
1239 1242
1243 set_quirks();
1244
1240 if (platform_driver_register(&acer_platform_driver)) { 1245 if (platform_driver_register(&acer_platform_driver)) {
1241 printk(ACER_ERR "Unable to register platform driver.\n"); 1246 printk(ACER_ERR "Unable to register platform driver.\n");
1242 goto error_platform_register; 1247 goto error_platform_register;
@@ -1267,6 +1272,7 @@ error_platform_register:
1267static void __exit acer_wmi_exit(void) 1272static void __exit acer_wmi_exit(void)
1268{ 1273{
1269 remove_sysfs(acer_platform_device); 1274 remove_sysfs(acer_platform_device);
1275 remove_debugfs();
1270 platform_device_del(acer_platform_device); 1276 platform_device_del(acer_platform_device);
1271 platform_driver_unregister(&acer_platform_driver); 1277 platform_driver_unregister(&acer_platform_driver);
1272 1278