Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1731578 > unrolled thread

[PATCH 2/2] mfd: tps65218: Introduce dependency on CONFIG_OF

Started byKeerthy <j-keerthy@ti.com>
First post2017-09-13 14:20 +0200
Last post2017-09-14 11:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2/2] mfd: tps65218: Introduce dependency on CONFIG_OF Keerthy <j-keerthy@ti.com> - 2017-09-13 14:20 +0200
    Re: [PATCH 2/2] mfd: tps65218: Introduce dependency on CONFIG_OF Lee Jones <lee.jones@linaro.org> - 2017-09-14 11:30 +0200

#1731578 — [PATCH 2/2] mfd: tps65218: Introduce dependency on CONFIG_OF

FromKeerthy <j-keerthy@ti.com>
Date2017-09-13 14:20 +0200
Subject[PATCH 2/2] mfd: tps65218: Introduce dependency on CONFIG_OF
Message-ID<upeO5-7fC-3@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1732140

FromLee Jones <lee.jones@linaro.org>
Date2017-09-14 11:30 +0200
Message-ID<upyD8-3bN-29@gated-at.bofh.it>
In reply to#1731578
On Wed, 13 Sep 2017, Keerthy wrote:

> 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(-)

Applied, thanks.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web