Message ID | 20170618101448.17734-2-hdegoede@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c index fb55fb4c39fc..54b53d8f96ce 100644 --- a/drivers/hid/i2c-hid/i2c-hid.c +++ b/drivers/hid/i2c-hid/i2c-hid.c @@ -1276,7 +1276,17 @@ static struct i2c_driver i2c_hid_driver = { .id_table = i2c_hid_id_table, }; -module_i2c_driver(i2c_hid_driver); +static int __init i2c_hid_init(void) +{ + return i2c_add_driver(&i2c_hid_driver); +} +module_init(i2c_hid_init); + +static void __exit i2c_hid_exit(void) +{ + i2c_del_driver(&i2c_hid_driver); +} +module_exit(i2c_hid_exit); MODULE_DESCRIPTION("HID over I2C core driver"); MODULE_AUTHOR("Benjamin Tissoires <benjamin.tissoires@gmail.com>");
This is a preparation patch for not registering the driver on some machines where just trying to probe a non HID compliant device causes issues. Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- drivers/hid/i2c-hid/i2c-hid.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)