compal-laptop/fujitsu-laptop/msi-laptop: make dmi_check_cb to return 1 instead of 0
dmi_check_system() walks the table running matching functions until someone returns non zero or we hit the end. This patch makes dmi_check_cb to return 1 so dmi_check_system() return immediately when a match is found. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au> Cc: Matthew Garrett <mjg@redhat.com>a Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
This commit is contained in:
parent
9be0fcb5ed
commit
80183a4b63
|
@ -275,7 +275,7 @@ static int set_backlight_level(int level)
|
||||||
|
|
||||||
ec_write(BACKLIGHT_LEVEL_ADDR, level);
|
ec_write(BACKLIGHT_LEVEL_ADDR, level);
|
||||||
|
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_backlight_level(void)
|
static int get_backlight_level(void)
|
||||||
|
|
|
@ -603,7 +603,7 @@ static int dmi_check_cb_s6410(const struct dmi_system_id *id)
|
||||||
dmi_check_cb_common(id);
|
dmi_check_cb_common(id);
|
||||||
fujitsu->keycode1 = KEY_SCREENLOCK; /* "Lock" */
|
fujitsu->keycode1 = KEY_SCREENLOCK; /* "Lock" */
|
||||||
fujitsu->keycode2 = KEY_HELP; /* "Mobility Center" */
|
fujitsu->keycode2 = KEY_HELP; /* "Mobility Center" */
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dmi_check_cb_s6420(const struct dmi_system_id *id)
|
static int dmi_check_cb_s6420(const struct dmi_system_id *id)
|
||||||
|
@ -611,7 +611,7 @@ static int dmi_check_cb_s6420(const struct dmi_system_id *id)
|
||||||
dmi_check_cb_common(id);
|
dmi_check_cb_common(id);
|
||||||
fujitsu->keycode1 = KEY_SCREENLOCK; /* "Lock" */
|
fujitsu->keycode1 = KEY_SCREENLOCK; /* "Lock" */
|
||||||
fujitsu->keycode2 = KEY_HELP; /* "Mobility Center" */
|
fujitsu->keycode2 = KEY_HELP; /* "Mobility Center" */
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dmi_check_cb_p8010(const struct dmi_system_id *id)
|
static int dmi_check_cb_p8010(const struct dmi_system_id *id)
|
||||||
|
@ -620,7 +620,7 @@ static int dmi_check_cb_p8010(const struct dmi_system_id *id)
|
||||||
fujitsu->keycode1 = KEY_HELP; /* "Support" */
|
fujitsu->keycode1 = KEY_HELP; /* "Support" */
|
||||||
fujitsu->keycode3 = KEY_SWITCHVIDEOMODE; /* "Presentation" */
|
fujitsu->keycode3 = KEY_SWITCHVIDEOMODE; /* "Presentation" */
|
||||||
fujitsu->keycode4 = KEY_WWW; /* "Internet" */
|
fujitsu->keycode4 = KEY_WWW; /* "Internet" */
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct dmi_system_id fujitsu_dmi_table[] = {
|
static struct dmi_system_id fujitsu_dmi_table[] = {
|
||||||
|
|
|
@ -434,7 +434,7 @@ static int dmi_check_cb(const struct dmi_system_id *id)
|
||||||
{
|
{
|
||||||
printk(KERN_INFO "msi-laptop: Identified laptop model '%s'.\n",
|
printk(KERN_INFO "msi-laptop: Identified laptop model '%s'.\n",
|
||||||
id->ident);
|
id->ident);
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct dmi_system_id __initdata msi_dmi_table[] = {
|
static struct dmi_system_id __initdata msi_dmi_table[] = {
|
||||||
|
|
Loading…
Reference in New Issue