On Mon, Oct 14, 2019 at 11:43:48AM +0300, Andy Shevchenko wrote: > Refactor restoring GPI_IE registers by using an introduced helper. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> > --- > drivers/pinctrl/intel/pinctrl-intel.c | 16 +++++++++++----- > 1 file changed, 11 insertions(+), 5 deletions(-) > > diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c > index e59ac31921e7..b9df243e19cf 100644 > --- a/drivers/pinctrl/intel/pinctrl-intel.c > +++ b/drivers/pinctrl/intel/pinctrl-intel.c > @@ -1607,6 +1607,15 @@ static void intel_restore_hostown(struct intel_pinctrl *pctrl, unsigned int c, > dev_warn(dev, "restored hostown %u/%u %#8x->%#8x\n", c, gpp, value, saved); > } > > +static void intel_restore_intmask(struct intel_pinctrl *pctrl, unsigned int c, > + void __iomem *base, unsigned int gpp, u32 saved) > +{ > + struct device *dev = pctrl->dev; const? Also should we do the same here as we do with others and check first whether we need to update the mask at all?