linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regulator: palmas: Remove *rdev[PALMAS_NUM_REGS] from struct palmas_pmic
@ 2016-05-29 11:01 Axel Lin
  0 siblings, 0 replies; 3+ messages in thread
From: Axel Lin @ 2016-05-29 11:01 UTC (permalink / raw)
  To: Mark Brown
  Cc: Laxman Dewangan, Nishanth Menon, Lee Jones, Liam Girdwood,
	linux-kernel

Current code uses devm_regulator_register(), so *rdev[PALMAS_NUM_REGS] is
no longer required.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/palmas-regulator.c | 12 ------------
 include/linux/mfd/palmas.h           |  1 -
 2 files changed, 13 deletions(-)

diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
index f11d41d..197a4cc 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b/drivers/regulator/palmas-regulator.c
@@ -980,9 +980,6 @@ static int palmas_ldo_registration(struct palmas_pmic *pmic,
 			return PTR_ERR(rdev);
 		}
 
-		/* Save regulator for cleanup */
-		pmic->rdev[id] = rdev;
-
 		/* Initialise sleep/init values from platform data */
 		if (pdata) {
 			reg_init = pdata->reg_init[id];
@@ -1090,9 +1087,6 @@ static int tps65917_ldo_registration(struct palmas_pmic *pmic,
 			return PTR_ERR(rdev);
 		}
 
-		/* Save regulator for cleanup */
-		pmic->rdev[id] = rdev;
-
 		/* Initialise sleep/init values from platform data */
 		if (pdata) {
 			reg_init = pdata->reg_init[id];
@@ -1277,9 +1271,6 @@ static int palmas_smps_registration(struct palmas_pmic *pmic,
 				pdev_name);
 			return PTR_ERR(rdev);
 		}
-
-		/* Save regulator for cleanup */
-		pmic->rdev[id] = rdev;
 	}
 
 	return 0;
@@ -1383,9 +1374,6 @@ static int tps65917_smps_registration(struct palmas_pmic *pmic,
 				pdev_name);
 			return PTR_ERR(rdev);
 		}
-
-		/* Save regulator for cleanup */
-		pmic->rdev[id] = rdev;
 	}
 
 	return 0;
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
index 5c9a1d4..aee7903 100644
--- a/include/linux/mfd/palmas.h
+++ b/include/linux/mfd/palmas.h
@@ -551,7 +551,6 @@ struct palmas_pmic {
 	struct palmas *palmas;
 	struct device *dev;
 	struct regulator_desc desc[PALMAS_NUM_REGS];
-	struct regulator_dev *rdev[PALMAS_NUM_REGS];
 	struct mutex mutex;
 
 	int smps123;
-- 
2.5.0

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

* [PATCH] regulator: palmas: Remove *rdev[PALMAS_NUM_REGS] from struct palmas_pmic
@ 2019-03-10 15:06 Axel Lin
  2019-03-13  4:59 ` Keerthy
  0 siblings, 1 reply; 3+ messages in thread
From: Axel Lin @ 2019-03-10 15:06 UTC (permalink / raw)
  To: Mark Brown
  Cc: Laxman Dewangan, J Keerthy, Nishanth Menon, linux-omap,
	Liam Girdwood, linux-kernel, Axel Lin

This driver is using devm_regulator_register() so it is not necessary
to save *rdev for clean up. Actually the pmic->rdev[id] is not used now.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/palmas-regulator.c | 12 ------------
 include/linux/mfd/palmas.h           |  1 -
 2 files changed, 13 deletions(-)

diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
index 7fb9e8dd834e..f13c7c8b1061 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b/drivers/regulator/palmas-regulator.c
@@ -991,9 +991,6 @@ static int palmas_ldo_registration(struct palmas_pmic *pmic,
 			return PTR_ERR(rdev);
 		}
 
-		/* Save regulator for cleanup */
-		pmic->rdev[id] = rdev;
-
 		/* Initialise sleep/init values from platform data */
 		if (pdata) {
 			reg_init = pdata->reg_init[id];
@@ -1101,9 +1098,6 @@ static int tps65917_ldo_registration(struct palmas_pmic *pmic,
 			return PTR_ERR(rdev);
 		}
 
-		/* Save regulator for cleanup */
-		pmic->rdev[id] = rdev;
-
 		/* Initialise sleep/init values from platform data */
 		if (pdata) {
 			reg_init = pdata->reg_init[id];
@@ -1288,9 +1282,6 @@ static int palmas_smps_registration(struct palmas_pmic *pmic,
 				pdev_name);
 			return PTR_ERR(rdev);
 		}
-
-		/* Save regulator for cleanup */
-		pmic->rdev[id] = rdev;
 	}
 
 	return 0;
@@ -1395,9 +1386,6 @@ static int tps65917_smps_registration(struct palmas_pmic *pmic,
 				pdev_name);
 			return PTR_ERR(rdev);
 		}
-
-		/* Save regulator for cleanup */
-		pmic->rdev[id] = rdev;
 	}
 
 	return 0;
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
index 75e5c8ff85fc..c34d5f0d34d7 100644
--- a/include/linux/mfd/palmas.h
+++ b/include/linux/mfd/palmas.h
@@ -553,7 +553,6 @@ struct palmas_pmic {
 	struct palmas *palmas;
 	struct device *dev;
 	struct regulator_desc desc[PALMAS_NUM_REGS];
-	struct regulator_dev *rdev[PALMAS_NUM_REGS];
 	struct mutex mutex;
 
 	int smps123;
-- 
2.17.1


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

* Re: [PATCH] regulator: palmas: Remove *rdev[PALMAS_NUM_REGS] from struct palmas_pmic
  2019-03-10 15:06 Axel Lin
@ 2019-03-13  4:59 ` Keerthy
  0 siblings, 0 replies; 3+ messages in thread
From: Keerthy @ 2019-03-13  4:59 UTC (permalink / raw)
  To: Axel Lin, Mark Brown
  Cc: Laxman Dewangan, Nishanth Menon, linux-omap, Liam Girdwood,
	linux-kernel



On 10/03/19 8:36 PM, Axel Lin wrote:
> This driver is using devm_regulator_register() so it is not necessary
> to save *rdev for clean up. Actually the pmic->rdev[id] is not used now.

Reviewed-by: Keerthy <j-keerthy@ti.com>

> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>   drivers/regulator/palmas-regulator.c | 12 ------------
>   include/linux/mfd/palmas.h           |  1 -
>   2 files changed, 13 deletions(-)
> 
> diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
> index 7fb9e8dd834e..f13c7c8b1061 100644
> --- a/drivers/regulator/palmas-regulator.c
> +++ b/drivers/regulator/palmas-regulator.c
> @@ -991,9 +991,6 @@ static int palmas_ldo_registration(struct palmas_pmic *pmic,
>   			return PTR_ERR(rdev);
>   		}
>   
> -		/* Save regulator for cleanup */
> -		pmic->rdev[id] = rdev;
> -
>   		/* Initialise sleep/init values from platform data */
>   		if (pdata) {
>   			reg_init = pdata->reg_init[id];
> @@ -1101,9 +1098,6 @@ static int tps65917_ldo_registration(struct palmas_pmic *pmic,
>   			return PTR_ERR(rdev);
>   		}
>   
> -		/* Save regulator for cleanup */
> -		pmic->rdev[id] = rdev;
> -
>   		/* Initialise sleep/init values from platform data */
>   		if (pdata) {
>   			reg_init = pdata->reg_init[id];
> @@ -1288,9 +1282,6 @@ static int palmas_smps_registration(struct palmas_pmic *pmic,
>   				pdev_name);
>   			return PTR_ERR(rdev);
>   		}
> -
> -		/* Save regulator for cleanup */
> -		pmic->rdev[id] = rdev;
>   	}
>   
>   	return 0;
> @@ -1395,9 +1386,6 @@ static int tps65917_smps_registration(struct palmas_pmic *pmic,
>   				pdev_name);
>   			return PTR_ERR(rdev);
>   		}
> -
> -		/* Save regulator for cleanup */
> -		pmic->rdev[id] = rdev;
>   	}
>   
>   	return 0;
> diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
> index 75e5c8ff85fc..c34d5f0d34d7 100644
> --- a/include/linux/mfd/palmas.h
> +++ b/include/linux/mfd/palmas.h
> @@ -553,7 +553,6 @@ struct palmas_pmic {
>   	struct palmas *palmas;
>   	struct device *dev;
>   	struct regulator_desc desc[PALMAS_NUM_REGS];
> -	struct regulator_dev *rdev[PALMAS_NUM_REGS];
>   	struct mutex mutex;
>   
>   	int smps123;
> 

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

end of thread, other threads:[~2019-03-13  4:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-29 11:01 [PATCH] regulator: palmas: Remove *rdev[PALMAS_NUM_REGS] from struct palmas_pmic Axel Lin
  -- strict thread matches above, loose matches on Subject: below --
2019-03-10 15:06 Axel Lin
2019-03-13  4:59 ` Keerthy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).