On Tue, Dec 15, 2020 at 5:02 PM Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote: > On Fri, Dec 11, 2020 at 3:03 PM Vaittinen, Matti > <Matti.Vaittinen@xxxxxxxxxxxxxxxxx> wrote: > > On Fri, 2020-12-11 at 20:27 +0900, Yoshihiro Shimoda wrote: > > > To simplify this driver, use dev_get_regmap() and > > > rid of using struct bd9571mwv. > > > > > > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx> > > > --- > > > drivers/regulator/bd9571mwv-regulator.c | 49 +++++++++++++++++---- > > > ------------ > > > 1 file changed, 26 insertions(+), 23 deletions(-) > > > > > > diff --git a/drivers/regulator/bd9571mwv-regulator.c > > > b/drivers/regulator/bd9571mwv-regulator.c > > > index e690c2c..02120b0 100644 > > > --- a/drivers/regulator/bd9571mwv-regulator.c > > > +++ b/drivers/regulator/bd9571mwv-regulator.c > > > @@ -17,7 +17,7 @@ > > > #include <linux/mfd/bd9571mwv.h> > > > > > > struct bd9571mwv_reg { > > > - struct bd9571mwv *bd; > > > + struct regmap *regmap; > > > > As a 'nit': > > I might consider adding the dev pointer here to avoid extra argument > > with all the bkup_mode functions below. (just pass this struct and > > mode). But that's only my preference - feel free to ignore this comment > > if patch is Ok to Mark, Marek & Others :) > > Struct regmap already contains a struct device pointer, but that's internal > to regmap. > > Perhaps adding a regmap_device() helper to retrieve the device pointer > might be worthwhile? -EEXISTS ;-) struct device *regmap_get_device(struct regmap *map) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds