[PATCH] gpio/generic: initialize the shadow of direction register

Lothar Waßmann LW at KARO-electronics.de
Wed May 16 03:34:39 EDT 2012


Shawn Guo writes:
> On Wed, May 16, 2012 at 08:53:42AM +0200, Lothar Waßmann wrote:
> > > @@ -394,6 +394,10 @@ int bgpio_init(struct bgpio_chip *bgc, struct device *dev,
> > >                 return ret;
> > > 
> > >         bgc->data = bgc->read_reg(bgc->reg_dat);
> > > +       if (bgc->gc.set == bgpio_set_set)
> > > +               bgc->data = bgc->read_reg(bgc->reg_set);
> > > +       if (bgc->reg_dir)
> > > +               bgc->dir = bgc->read_reg(bgc->reg_dir);
> > > 
> > >         return ret;
> > >  }
> > > 
> > That might change the behaviour of existing implementations.
> > 
> Can you be specific?  I do not quite follow on that.
> 
You initialize a variable to a specific value that defaulted to zero
before.


Lothar Waßmann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________



More information about the linux-arm-kernel mailing list