From: Dmitry Mastykin <mastichi@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Dmitry Mastykin <mastichi@gmail.com>,
Jonathan Cameron <jic23@kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Jacopo Mondi <jacopo+renesas@jmondi.org>,
Rob Herring <robh@kernel.org>,
Dan Carpenter <dan.carpenter@oracle.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] iio: adc: max9611: fix module auto-loading
Date: Fri, 29 Dec 2017 10:14:27 +0300 [thread overview]
Message-ID: <1514531684-3872-1-git-send-email-mastichi@gmail.com> (raw)
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
next reply other threads:[~2017-12-29 7:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-29 7:14 Dmitry Mastykin [this message]
2017-12-29 9:11 ` jacopo mondi
2017-12-29 9:12 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1514531684-3872-1-git-send-email-mastichi@gmail.com \
--to=mastichi@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=jacopo+renesas@jmondi.org \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®