lkml.org 
[lkml]   [2018]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] regulator: bd718x7: Remove struct bd718xx_pmic
Hello Axel,

On Wed, Oct 03, 2018 at 11:32:46PM +0800, Axel Lin wrote:
> All the fields in struct bd718xx_pmic are not really necessary.
> Remove struct bd718xx_pmic to simplify the code.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> v2:
> Sorry, just update the subject line.
>
> drivers/regulator/bd718x7-regulator.c | 59 +++++++++------------------
> 1 file changed, 20 insertions(+), 39 deletions(-)
>
> diff --git a/drivers/regulator/bd718x7-regulator.c b/drivers/regulator/bd718x7-regulator.c
> index d2522d4e1505..3a47e0372e77 100644
> --- a/drivers/regulator/bd718x7-regulator.c
> +++ b/drivers/regulator/bd718x7-regulator.c
> @@ -15,13 +15,6 @@
> #include <linux/regulator/of_regulator.h>
> #include <linux/slab.h>
>
> -struct bd718xx_pmic {
> - struct bd718xx_regulator_data *rdata;
> - struct bd718xx *mfd;
> - struct platform_device *pdev;
> - struct regulator_dev *rdev[BD718XX_REGULATOR_AMOUNT];
> -};

You should then also remove the references to struct bd718xx_pmic from
include/linux/mfd/rohm-bd718x7.h. Now we have there:

struct bd71837_pmic;
struct bd71837_clk;

struct bd71837 {
struct device *dev;
struct regmap *regmap;
unsigned long int id;

int chip_irq;
struct regmap_irq_chip_data *irq_data;

struct bd71837_pmic *pmic;
struct bd71837_clk *clk;
};

Other than that - simplifications are always welcome.
Reviewed-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>

\
 
 \ /
  Last update: 2018-10-04 08:43    [W:0.037 / U:0.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site