Re: [PATCH v3] regulator: bd718x7: Remove struct bd718xx_pmic

From: Matti Vaittinen
Date: Thu Oct 04 2018 - 03:10:40 EST


On Thu, Oct 04, 2018 at 02:51:48PM +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@xxxxxxxxxx>
> Reviewed-by: Matti Vaittinen <matti.vaittinen@xxxxxxxxxxxxxxxxx>
> ---
> v3: Remove the references to struct bd718xx_pmic from include/linux/mfd/rohm-bd718x7.h
>
> drivers/regulator/bd718x7-regulator.c | 59 +++++++++------------------
> include/linux/mfd/rohm-bd718x7.h | 1 -
> 2 files changed, 20 insertions(+), 40 deletions(-)

<snip>

> diff --git a/include/linux/mfd/rohm-bd718x7.h b/include/linux/mfd/rohm-bd718x7.h
> index 26acf9a92498..7d29e3599793 100644
> --- a/include/linux/mfd/rohm-bd718x7.h
> +++ b/include/linux/mfd/rohm-bd718x7.h
> @@ -321,7 +321,6 @@ enum {
> BD718XX_PWRBTN_LONG_PRESS_15S
> };
>
> -struct bd718xx_pmic;
> struct bd718xx_clk;
>
> struct bd718xx {
> --
> 2.17.1
>

Please also drop the pointer to struct bd718xx_pmic inside
the struct bd718xx.

struct bd718xx {
<snip>
struct bd71837_pmic *pmic;
struct bd71837_clk *clk;
};

Br,
Matti Vaittinen