iio: Export I2C module alias information in missing drivers
authorJavier Martinez Canillas <javier@osg.samsung.com>
Thu, 30 Jul 2015 16:18:28 +0000 (18:18 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 2 Aug 2015 15:35:01 +0000 (16:35 +0100)
The I2C core always reports the MODALIAS uevent as "i2c:<client name"
regardless if the driver was matched using the I2C id_table or the
of_match_table. So the driver needs to export the I2C table and this
be built into the module or udev won't have the necessary information
to auto load the correct module when the device is added.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/accel/stk8312.c
drivers/iio/accel/stk8ba50.c
drivers/iio/light/stk3310.c

index c2bd1444d6daffafcdd5cede819247bec9d76e64..a553736b6e5107f30f78ad499a3503ebe5f85c8f 100644 (file)
@@ -662,6 +662,7 @@ static const struct i2c_device_id stk8312_i2c_id[] = {
        {"STK8312", 0},
        {}
 };
+MODULE_DEVICE_TABLE(i2c, stk8312_i2c_id);
 
 static const struct acpi_device_id stk8312_acpi_id[] = {
        {"STK8312", 0},
index 16cee637109b846add6f4cf5b87a58e622c59657..80f77d8704b5bf29fdc857a8b5f548a9a24a9f47 100644 (file)
@@ -572,6 +572,7 @@ static const struct i2c_device_id stk8ba50_i2c_id[] = {
        {"stk8ba50", 0},
        {}
 };
+MODULE_DEVICE_TABLE(i2c, stk8ba50_i2c_id);
 
 static const struct acpi_device_id stk8ba50_acpi_id[] = {
        {"STK8BA50", 0},
index fee4297d7c8f8e039dd1716c655deff831f01a84..d26b931730ee9d6e4e13cf64160e16eb35da63ea 100644 (file)
@@ -695,6 +695,7 @@ static const struct i2c_device_id stk3310_i2c_id[] = {
        {"STK3311", 0},
        {}
 };
+MODULE_DEVICE_TABLE(i2c, stk3310_i2c_id);
 
 static const struct acpi_device_id stk3310_acpi_id[] = {
        {"STK3310", 0},