Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
From: Keerthy <j-keerthy@ti.com>
To: lee.jones@linaro.org
Cc: tony@atomide.com, linux-kernel@vger.kernel.org,
	linux-omap@vger.kernel.org, j-keerthy@ti.com
Subject: [PATCH 2/2] mfd: tps65218: Introduce dependency on CONFIG_OF
Date: Wed, 13 Sep 2017 17:47:10 +0530	[thread overview]
Message-ID: <1505305030-13263-2-git-send-email-j-keerthy@ti.com> (raw)
In-Reply-To: <1505305030-13263-1-git-send-email-j-keerthy@ti.com>

Currently the driver boots only via device tree hence add a
dependency on CONFIG_OF. This leaves with a bunch of unused code
so clean that up.

Signed-off-by: Keerthy <j-keerthy@ti.com>
---
 drivers/mfd/Kconfig    | 2 +-
 drivers/mfd/tps65218.c | 8 --------
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 44c529e..682336d 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -1400,7 +1400,7 @@ config MFD_TI_LP87565
 
 config MFD_TPS65218
 	tristate "TI TPS65218 Power Management chips"
-	depends on I2C
+	depends on I2C && OF
 	select MFD_CORE
 	select REGMAP_I2C
 	select REGMAP_IRQ
diff --git a/drivers/mfd/tps65218.c b/drivers/mfd/tps65218.c
index 13834a0..910f569 100644
--- a/drivers/mfd/tps65218.c
+++ b/drivers/mfd/tps65218.c
@@ -215,17 +215,9 @@ static int tps65218_probe(struct i2c_client *client,
 				const struct i2c_device_id *ids)
 {
 	struct tps65218 *tps;
-	const struct of_device_id *match;
 	int ret;
 	unsigned int chipid;
 
-	match = of_match_device(of_tps65218_match_table, &client->dev);
-	if (!match) {
-		dev_err(&client->dev,
-			"Failed to find matching dt id\n");
-		return -EINVAL;
-	}
-
 	tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL);
 	if (!tps)
 		return -ENOMEM;
-- 
1.9.1

  reply	other threads:[~2017-09-13 12:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-13 12:17 [PATCH 1/2] mfd: tps65218: Correct the config description Keerthy
2017-09-13 12:17 ` Keerthy [this message]
2017-09-14  9:28   ` [PATCH 2/2] mfd: tps65218: Introduce dependency on CONFIG_OF Lee Jones
2017-09-14  9:28 ` [PATCH 1/2] mfd: tps65218: Correct the config description 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=1505305030-13263-2-git-send-email-j-keerthy@ti.com \
    --to=j-keerthy@ti.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox