Input: lifebook - make dmi callback functions return 1
authorAxel Lin <axel.lin@gmail.com>
Wed, 13 Jul 2011 07:02:21 +0000 (00:02 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 13 Jul 2011 07:08:15 +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.

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

index c31ad11df6bb11f5a3dbf77d000670ebd655ffbd..83bcaba96b895b8a06b5217507f902b1c4066c5f 100644 (file)
@@ -33,7 +33,7 @@ static const char *desired_serio_phys;
 static int lifebook_limit_serio3(const struct dmi_system_id *d)
 {
        desired_serio_phys = "isa0060/serio3";
-       return 0;
+       return 1;
 }
 
 static bool lifebook_use_6byte_proto;
@@ -41,7 +41,7 @@ static bool lifebook_use_6byte_proto;
 static int lifebook_set_6byte_proto(const struct dmi_system_id *d)
 {
        lifebook_use_6byte_proto = true;
-       return 0;
+       return 1;
 }
 
 static const struct dmi_system_id __initconst lifebook_dmi_table[] = {