public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] mfd: sec-core: Remove duplicated device type from sec_pmic
@ 2014-04-14 12:03 Krzysztof Kozlowski
  2014-04-14 12:03 ` [PATCH 2/2] mfd: sec-core: Update sec_pmic documentation Krzysztof Kozlowski
  2014-04-17  8:26 ` [PATCH 1/2] mfd: sec-core: Remove duplicated device type from sec_pmic Lee Jones
  0 siblings, 2 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2014-04-14 12:03 UTC (permalink / raw)
  To: Sangbeom Kim, Samuel Ortiz, Lee Jones, linux-kernel
  Cc: Kyungmin Park, Marek Szyprowski, Bartlomiej Zolnierkiewicz,
	Krzysztof Kozlowski

The device type was stored in sec_pmic state container twice:
 - unsigned long type
 - int device_type

The 'type' field was never used outside of probe so it can be safely
removed.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
 drivers/mfd/sec-core.c           | 5 +++--
 include/linux/mfd/samsung/core.h | 1 -
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
index d4682c6cbff5..fccfd71f8abd 100644
--- a/drivers/mfd/sec-core.c
+++ b/drivers/mfd/sec-core.c
@@ -251,6 +251,7 @@ static int sec_pmic_probe(struct i2c_client *i2c,
 	struct sec_platform_data *pdata = dev_get_platdata(&i2c->dev);
 	const struct regmap_config *regmap;
 	struct sec_pmic_dev *sec_pmic;
+	unsigned long device_type;
 	int ret;
 
 	sec_pmic = devm_kzalloc(&i2c->dev, sizeof(struct sec_pmic_dev),
@@ -262,7 +263,7 @@ static int sec_pmic_probe(struct i2c_client *i2c,
 	sec_pmic->dev = &i2c->dev;
 	sec_pmic->i2c = i2c;
 	sec_pmic->irq = i2c->irq;
-	sec_pmic->type = sec_i2c_get_driver_data(i2c, id);
+	device_type = sec_i2c_get_driver_data(i2c, id);
 
 	if (sec_pmic->dev->of_node) {
 		pdata = sec_pmic_i2c_parse_dt_pdata(sec_pmic->dev);
@@ -270,7 +271,7 @@ static int sec_pmic_probe(struct i2c_client *i2c,
 			ret = PTR_ERR(pdata);
 			return ret;
 		}
-		pdata->device_type = sec_pmic->type;
+		pdata->device_type = (int)device_type;
 	}
 	if (pdata) {
 		sec_pmic->device_type = pdata->device_type;
diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h
index 84aaf6c25794..2633083262ea 100644
--- a/include/linux/mfd/samsung/core.h
+++ b/include/linux/mfd/samsung/core.h
@@ -49,7 +49,6 @@ struct sec_pmic_dev {
 	struct regmap_irq_chip_data *irq_data;
 
 	int ono;
-	unsigned long type;
 	bool wakeup;
 	bool wtsr_smpl;
 };
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-04-22  8:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-14 12:03 [PATCH 1/2] mfd: sec-core: Remove duplicated device type from sec_pmic Krzysztof Kozlowski
2014-04-14 12:03 ` [PATCH 2/2] mfd: sec-core: Update sec_pmic documentation Krzysztof Kozlowski
2014-04-17  8:32   ` Lee Jones
2014-04-18  7:59     ` Krzysztof Kozlowski
2014-04-17  8:26 ` [PATCH 1/2] mfd: sec-core: Remove duplicated device type from sec_pmic Lee Jones
2014-04-18  7:54   ` Krzysztof Kozlowski
2014-04-22  8:09     ` Lee Jones
2014-04-22  8:41       ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox