Linux IIO development
 help / color / mirror / Atom feed
From: Matt Ranostay <mranostay@gmail.com>
To: linux-iio@vger.kernel.org
Cc: jic23@kernel.org, Matt Ranostay <mranostay@gmail.com>
Subject: [PATCH] iio: chemical: ams-iaq-core: update driver name and DT match table
Date: Mon,  1 Aug 2016 21:25:16 -0700	[thread overview]
Message-ID: <1470111916-9104-1-git-send-email-mranostay@gmail.com> (raw)

DT match name should be similar to the i2c device table entry, and also
make the iio name match the driver name versus the i2c device location.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
---
 drivers/iio/chemical/ams-iaq-core.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/chemical/ams-iaq-core.c b/drivers/iio/chemical/ams-iaq-core.c
index 41a8e6f2e31d..4c7d1f918d34 100644
--- a/drivers/iio/chemical/ams-iaq-core.c
+++ b/drivers/iio/chemical/ams-iaq-core.c
@@ -27,6 +27,8 @@
 #define AMS_IAQCORE_VOC_RESISTANCE_IDX	1
 #define AMS_IAQCORE_VOC_TVOC_IDX	2
 
+#define AMS_IAQCORE_DRVNAME		"ams-iaq-core"
+
 struct ams_iaqcore_reading {
 	__be16 co2_ppm;
 	u8 status;
@@ -164,7 +166,7 @@ static int ams_iaqcore_probe(struct i2c_client *client,
 
 	indio_dev->dev.parent = &client->dev;
 	indio_dev->info = &ams_iaqcore_info,
-	indio_dev->name = dev_name(&client->dev);
+	indio_dev->name = AMS_IAQCORE_DRVNAME;
 	indio_dev->modes = INDIO_DIRECT_MODE;
 
 	indio_dev->channels = ams_iaqcore_channels;
@@ -180,14 +182,14 @@ static const struct i2c_device_id ams_iaqcore_id[] = {
 MODULE_DEVICE_TABLE(i2c, ams_iaqcore_id);
 
 static const struct of_device_id ams_iaqcore_dt_ids[] = {
-	{ .compatible = "ams,iaq-core" },
+	{ .compatible = "ams,ams-iaq-core" },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, ams_iaqcore_dt_ids);
 
 static struct i2c_driver ams_iaqcore_driver = {
 	.driver = {
-		.name	= "ams-iaq-core",
+		.name = AMS_IAQCORE_DRVNAME,
 		.of_match_table = of_match_ptr(ams_iaqcore_dt_ids),
 	},
 	.probe = ams_iaqcore_probe,
-- 
2.7.4


             reply	other threads:[~2016-08-02  5:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-02  4:25 Matt Ranostay [this message]
2016-08-03 12:13 ` [PATCH] iio: chemical: ams-iaq-core: update driver name and DT match table Lars-Peter Clausen
2016-08-03 20:02   ` Matt Ranostay
2016-08-03 20:08     ` Lars-Peter Clausen
2016-08-04  2:25       ` Matt Ranostay

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=1470111916-9104-1-git-send-email-mranostay@gmail.com \
    --to=mranostay@gmail.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.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