auto-probes module when device is detected and prepare module extension to other hid mechanical sensors. Signed-off-by: Alexandre Relange <alexandre@xxxxxxxxxxx> --- drivers/iio/mechanical/hid-sensor-switch.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/iio/mechanical/hid-sensor-switch.c b/drivers/iio/mechanical/hid-sensor-switch.c index 7027305..1556ee5 100644 --- a/drivers/iio/mechanical/hid-sensor-switch.c +++ b/drivers/iio/mechanical/hid-sensor-switch.c @@ -344,11 +344,18 @@ static int hid_switch_remove(struct platform_device *pdev) return 0; } +static const struct platform_device_id switch_id_table[] = { + { "HID-SENSOR-200061", 0 }, + { } /* Terminating Entry */ +}; +MODULE_DEVICE_TABLE(platform, switch_id_table); + static struct platform_driver hid_switch_platform_driver = { .driver = { .name = DRIVER_NAME, .owner = THIS_MODULE, }, + .id_table = switch_id_table, .probe = hid_switch_probe, .remove = hid_switch_remove, }; -- 1.8.3 -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html