On Monday 12 October 2009 16:39:03 Greg KH wrote: > On Mon, Oct 12, 2009 at 12:40:35PM +0200, Robert Gerlach wrote: > > +static struct { /* fscbtns_t */ > > + struct platform_device *pdev; > > + struct input_dev *idev_b; /* tablet buttons */ > > + struct input_dev *idev_s; /* orientation switch */ > > +#if (defined(STICKY_TIMEOUT) && (STICKY_TIMEOUT > 0)) > > + struct timer_list timer; > > +#endif > > Why would you not want this defined? I'm not sure about the sticky keys stuff at all (right way, right place, aso), so I put all related code in this ifdefs. I think I'll remove the ifdefs, if the sticky code okay. > > +static unsigned int user_model; > > +module_param_named(model, user_model, uint, 0); > > +MODULE_PARM_DESC(model, "model (1 = Stylistic, 2 = Lifebook T- and > > P-Series, 3 = Stylistic ST5xxx, 4 = Lifebook U800)"); > > I don't think you need this module parameter anymore, right? Now that > you are matching on DMI strings, it can be detected automatically. Right, I'll remove this. > > +static struct dmi_system_id dmi_ids[] __initdata = { > > + { > > + .callback = fscbtns_dmi_matched, > > + .ident = "Fujitsu Siemens P/T Series", > > + .matches = { > > + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), > > + DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK") > > + }, > > + .driver_data = &config_Lifebook_Tseries > > + }, > > + { > > + .callback = fscbtns_dmi_matched, > > + .ident = "Fujitsu Lifebook T Series", > > + .matches = { > > + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), > > + DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook T") > > + }, > > + .driver_data = &config_Lifebook_Tseries > > + }, > > + { > > + .callback = fscbtns_dmi_matched, > > + .ident = "Fujitsu Siemens Stylistic T Series", > > + .matches = { > > + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), > > + DMI_MATCH(DMI_PRODUCT_NAME, "Stylistic T") > > + }, > > + .driver_data = &config_Stylistic_Tseries > > + }, > > + { > > + .callback = fscbtns_dmi_matched, > > + .ident = "Fujitsu LifeBook U810", > > + .matches = { > > + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), > > + DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook U810") > > + }, > > + .driver_data = &config_Lifebook_U810 > > + }, > > + { > > + .callback = fscbtns_dmi_matched, > > + .ident = "Fujitsu Siemens Stylistic ST5xxx Series", > > + .matches = { > > + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), > > + DMI_MATCH(DMI_PRODUCT_NAME, "STYLISTIC ST5") > > + }, > > + .driver_data = &config_Stylistic_ST5xxx > > + }, > > + { > > + .callback = fscbtns_dmi_matched, > > + .ident = "Fujitsu Siemens Stylistic ST5xxx Series", > > + .matches = { > > + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), > > + DMI_MATCH(DMI_PRODUCT_NAME, "Stylistic ST5") > > + }, > > + .driver_data = &config_Stylistic_ST5xxx > > + }, > > + { > > + .callback = fscbtns_dmi_matched, > > + .ident = "Unknown (using defaults)", > > + .matches = { > > + DMI_MATCH(DMI_SYS_VENDOR, ""), > > + DMI_MATCH(DMI_PRODUCT_NAME, "") > > + }, > > + .driver_data = &config_Lifebook_Tseries > > + }, > > + { NULL } > > +}; > > Add a MODULE_DEVICE_TABLE for this structure, and then it will be loaded > automatically by the userspace module scripts if the device is present > on the machine. It should be as simple as adding the line: > MODULE_DEVICE_TABLE(dmi, dmi_ids); I'm not sure if the DMI a good source for this, because only a subset of the Stylistic and Lifebook models have this device. I would rather use the presence of the ACPI entry (like the windows driver), if it's not a problem. static const struct acpi_device_id fscbtns_ids[] = { { .id = "FUJ02BD" }, { .id = "FUJ02BF" }, { .id = "" } }; MODULE_DEVICE_TABLE(acpi, fscbtns_ids); Many thanks for the comments. I'll send a updated patch to the linux-input list in the next days. Robert _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel