From: Jacob Pan <jacob.jun.pan@linux.intel.com>
To: LKML <linux-kernel@vger.kernel.org>,
IIO <linux-iio@vger.kernel.org>,
Jonathan Cameron <jic23@kernel.org>,
Lee Jones <lee.jones@linaro.org>
Cc: Carlo Caione <carlo@caione.org>,
Samuel Ortiz <sameo@linux.intel.com>,
Ramakrishna Pallala <ramakrishna.pallala@intel.com>,
Todd Brandt <todd.e.brandt@linux.intel.com>,
Peter Meerwald <pmeerw@pmeerw.net>,
Rafael Wysocki <rafael.j.wysocki@intel.com>,
Hartmut Knaack <knaack.h@gmx.de>, Aaron Lu <aaron.lu@intel.com>,
Jacob Pan <jacob.jun.pan@linux.intel.com>
Subject: [PATCH 1/3] iio: adc: Add module device table for autoloading
Date: Tue, 11 Nov 2014 11:30:08 -0800 [thread overview]
Message-ID: <1415734210-5657-2-git-send-email-jacob.jun.pan@linux.intel.com> (raw)
In-Reply-To: <1415734210-5657-1-git-send-email-jacob.jun.pan@linux.intel.com>
From: Aaron Lu <aaron.lu@intel.com>
Add the module device id table so that the driver can be automatically
loaded once the platform device is created.
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
---
drivers/iio/adc/axp288_adc.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/iio/adc/axp288_adc.c b/drivers/iio/adc/axp288_adc.c
index 4800286..4a6cf43 100644
--- a/drivers/iio/adc/axp288_adc.c
+++ b/drivers/iio/adc/axp288_adc.c
@@ -238,15 +238,23 @@ static int axp288_adc_remove(struct platform_device *pdev)
return 0;
}
+static struct platform_device_id axp288_adc_id_table[] = {
+ { .name = "axp288_adc" },
+ {},
+};
+
static struct platform_driver axp288_adc_driver = {
.probe = axp288_adc_probe,
.remove = axp288_adc_remove,
+ .id_table = axp288_adc_id_table,
.driver = {
.name = "axp288_adc",
.owner = THIS_MODULE,
},
};
+MODULE_DEVICE_TABLE(platform, axp288_adc_id_table);
+
module_platform_driver(axp288_adc_driver);
MODULE_AUTHOR("Jacob Pan <jacob.jun.pan@linux.intel.com>");
--
1.9.1
next prev parent reply other threads:[~2014-11-11 19:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-11 19:30 [PATCH 0/3] axp20x minor fixes Jacob Pan
2014-11-11 19:30 ` Jacob Pan [this message]
2014-11-15 16:00 ` [PATCH 1/3] iio: adc: Add module device table for autoloading Jonathan Cameron
2014-11-18 15:26 ` Lee Jones
2014-11-11 19:30 ` [PATCH 2/3] mfd/axp20x: avoid irq numbering collision Jacob Pan
2014-11-18 15:24 ` Lee Jones
2014-11-11 19:30 ` [PATCH 3/3] iio/axp288_adc: remove THIS_MODULE owner Jacob Pan
2014-11-15 16:00 ` Jonathan Cameron
2014-11-18 15:25 ` Lee Jones
2014-11-18 15:49 ` [GIT PULL] Immutable branch between MFD and IIO (second tag) Lee Jones
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=1415734210-5657-2-git-send-email-jacob.jun.pan@linux.intel.com \
--to=jacob.jun.pan@linux.intel.com \
--cc=aaron.lu@intel.com \
--cc=carlo@caione.org \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lee.jones@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=rafael.j.wysocki@intel.com \
--cc=ramakrishna.pallala@intel.com \
--cc=sameo@linux.intel.com \
--cc=todd.e.brandt@linux.intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.