Input: atkbd - make dmi callback functions return 1
authorAxel Lin <axel.lin@gmail.com>
Wed, 13 Jul 2011 06:59:41 +0000 (23:59 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 13 Jul 2011 07:08:10 +0000 (00:08 -0700)
We only care about if there is a successful match from the table (or
no match at all), so let's make dmi_check_system return immediately
instead of iterating thorough the whole table.

Make the dmi callback function return 1 then dmi_check_system
will return immediately if we have a successful match.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/keyboard/atkbd.c

index 11478eb2c27de1ec332b8f3e4a5b1a56408b49ce..19cfc0cf558c99b18875ca0fd0b6aac26134e356 100644 (file)
@@ -1578,14 +1578,14 @@ static int __init atkbd_setup_forced_release(const struct dmi_system_id *id)
        atkbd_platform_fixup = atkbd_apply_forced_release_keylist;
        atkbd_platform_fixup_data = id->driver_data;
 
-       return 0;
+       return 1;
 }
 
 static int __init atkbd_setup_scancode_fixup(const struct dmi_system_id *id)
 {
        atkbd_platform_scancode_fixup = id->driver_data;
 
-       return 0;
+       return 1;
 }
 
 static const struct dmi_system_id atkbd_dmi_quirk_table[] __initconst = {