diff options
Diffstat (limited to 'drivers/input/mouse/lifebook.c')
-rw-r--r-- | drivers/input/mouse/lifebook.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/input/mouse/lifebook.c b/drivers/input/mouse/lifebook.c index 54b7f64d6e62..cd81cefdc1c5 100644 --- a/drivers/input/mouse/lifebook.c +++ b/drivers/input/mouse/lifebook.c @@ -25,11 +25,13 @@ struct lifebook_data { char phys[32]; }; +static bool lifebook_present; + static const char *desired_serio_phys; -static int lifebook_set_serio_phys(const struct dmi_system_id *d) +static int lifebook_limit_serio3(const struct dmi_system_id *d) { - desired_serio_phys = d->driver_data; + desired_serio_phys = "isa0060/serio3"; return 0; } @@ -41,7 +43,8 @@ static int lifebook_set_6byte_proto(const struct dmi_system_id *d) return 0; } -static const struct dmi_system_id lifebook_dmi_table[] = { +static const struct dmi_system_id __initconst lifebook_dmi_table[] = { +#if defined(CONFIG_DMI) && defined(CONFIG_X86) { .ident = "FLORA-ie 55mi", .matches = { @@ -83,8 +86,7 @@ static const struct dmi_system_id lifebook_dmi_table[] = { .matches = { DMI_MATCH(DMI_PRODUCT_NAME, "CF-18"), }, - .callback = lifebook_set_serio_phys, - .driver_data = "isa0060/serio3", + .callback = lifebook_limit_serio3, }, { .ident = "Panasonic CF-28", @@ -116,8 +118,14 @@ static const struct dmi_system_id lifebook_dmi_table[] = { }, }, { } +#endif }; +void __init lifebook_module_init(void) +{ + lifebook_present = dmi_check_system(lifebook_dmi_table); +} + static psmouse_ret_t lifebook_process_byte(struct psmouse *psmouse) { struct lifebook_data *priv = psmouse->private; @@ -243,7 +251,7 @@ static void lifebook_disconnect(struct psmouse *psmouse) int lifebook_detect(struct psmouse *psmouse, bool set_properties) { - if (!dmi_check_system(lifebook_dmi_table)) + if (!lifebook_present) return -1; if (desired_serio_phys && |