lkml.org 
[lkml]   [2017]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] iio: adc: max9611: fix module auto-loading
Date
Module auto-load doesn't work because i2c table is not exported.

Signed-off-by: Dmitry Mastykin <mastichi@gmail.com>
---
drivers/iio/adc/max9611.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/adc/max9611.c b/drivers/iio/adc/max9611.c
index b1dd17c..7924b5c 100644
--- a/drivers/iio/adc/max9611.c
+++ b/drivers/iio/adc/max9611.c
@@ -516,13 +516,20 @@ static int max9611_init(struct max9611_dev *max9611)
return 0;
}

+static const struct i2c_device_id max9611_id[] = {
+ { "max9611", 0 },
+ { "max9612", 0 },
+ { },
+ };
+MODULE_DEVICE_TABLE(i2c, max9611_id);
+
static const struct of_device_id max9611_of_table[] = {
{.compatible = "maxim,max9611", .data = "max9611"},
{.compatible = "maxim,max9612", .data = "max9612"},
{ },
};
-
MODULE_DEVICE_TABLE(of, max9611_of_table);
+
static int max9611_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
--
2.7.4
\
 
 \ /
  Last update: 2017-12-29 08:16    [W:0.033 / U:7.708 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site