summaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier@osg.samsung.com>2017-01-25 14:38:55 +0100
committerSebastian Reichel <sre@kernel.org>2017-01-29 23:15:17 +0100
commit166e8dbd630af5248c66c29082480d3cc44da010 (patch)
tree943ce49e4f9260d41ab418193528fcb50601d2a7 /drivers/power
parentpower: supply: bq2415x: check for NULL acpi_id to avoid null pointer dereference (diff)
downloadlinux-166e8dbd630af5248c66c29082480d3cc44da010.tar.xz
linux-166e8dbd630af5248c66c29082480d3cc44da010.zip
power: supply: max14656: Export I2C and OF device ID as module aliases
If the driver is built as a module, I2C module alias information is not filled so the module won't be autoloaded. Export the I2C and OF devices ID to the module by using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/power/supply/max14656_charger_detector.ko | grep alias $ After this patch: $ modinfo drivers/power/supply/max14656_charger_detector.ko | grep alias alias: i2c:max14656 alias: of:N*T*Cmaxim,max14656C* alias: of:N*T*Cmaxim,max14656 Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/max14656_charger_detector.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/power/supply/max14656_charger_detector.c b/drivers/power/supply/max14656_charger_detector.c
index 80f8e5c1b4ec..b91b1d2999dc 100644
--- a/drivers/power/supply/max14656_charger_detector.c
+++ b/drivers/power/supply/max14656_charger_detector.c
@@ -305,11 +305,13 @@ static const struct i2c_device_id max14656_id[] = {
{ "max14656", 0 },
{}
};
+MODULE_DEVICE_TABLE(i2c, max14656_id);
static const struct of_device_id max14656_match_table[] = {
{ .compatible = "maxim,max14656", },
{}
};
+MODULE_DEVICE_TABLE(of, max14656_match_table);
static struct i2c_driver max14656_i2c_driver = {
.driver = {