@@ -25,11 +25,13 @@ struct lifebook_data {
2525 char phys [32 ];
2626};
2727
28+ static bool lifebook_present ;
29+
2830static const char * desired_serio_phys ;
2931
30- static int lifebook_set_serio_phys (const struct dmi_system_id * d )
32+ static int lifebook_limit_serio3 (const struct dmi_system_id * d )
3133{
32- desired_serio_phys = d -> driver_data ;
34+ desired_serio_phys = "isa0060/serio3" ;
3335 return 0 ;
3436}
3537
@@ -41,7 +43,8 @@ static int lifebook_set_6byte_proto(const struct dmi_system_id *d)
4143 return 0 ;
4244}
4345
44- static const struct dmi_system_id lifebook_dmi_table [] = {
46+ static const struct dmi_system_id __initconst lifebook_dmi_table [] = {
47+ #if defined(CONFIG_DMI ) && defined (CONFIG_X86 )
4548 {
4649 .ident = "FLORA-ie 55mi" ,
4750 .matches = {
@@ -83,8 +86,7 @@ static const struct dmi_system_id lifebook_dmi_table[] = {
8386 .matches = {
8487 DMI_MATCH (DMI_PRODUCT_NAME , "CF-18" ),
8588 },
86- .callback = lifebook_set_serio_phys ,
87- .driver_data = "isa0060/serio3" ,
89+ .callback = lifebook_limit_serio3 ,
8890 },
8991 {
9092 .ident = "Panasonic CF-28" ,
@@ -116,8 +118,14 @@ static const struct dmi_system_id lifebook_dmi_table[] = {
116118 },
117119 },
118120 { }
121+ #endif
119122};
120123
124+ void __init lifebook_module_init (void )
125+ {
126+ lifebook_present = dmi_check_system (lifebook_dmi_table );
127+ }
128+
121129static psmouse_ret_t lifebook_process_byte (struct psmouse * psmouse )
122130{
123131 struct lifebook_data * priv = psmouse -> private ;
@@ -243,7 +251,7 @@ static void lifebook_disconnect(struct psmouse *psmouse)
243251
244252int lifebook_detect (struct psmouse * psmouse , bool set_properties )
245253{
246- if (!dmi_check_system ( lifebook_dmi_table ) )
254+ if (!lifebook_present )
247255 return -1 ;
248256
249257 if (desired_serio_phys &&
0 commit comments