aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mfd/sm501.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c
index 4c4412e0de24..3a0ecfc404e9 100644
--- a/drivers/mfd/sm501.c
+++ b/drivers/mfd/sm501.c
@@ -813,6 +813,9 @@ static DEVICE_ATTR(dbg_regs, 0666, sm501_dbg_regs, NULL);
813/* sm501_init_reg 813/* sm501_init_reg
814 * 814 *
815 * Helper function for the init code to setup a register 815 * Helper function for the init code to setup a register
816 *
817 * clear the bits which are set in r->mask, and then set
818 * the bits set in r->set.
816*/ 819*/
817 820
818static inline void sm501_init_reg(struct sm501_devdata *sm, 821static inline void sm501_init_reg(struct sm501_devdata *sm,
@@ -822,8 +825,8 @@ static inline void sm501_init_reg(struct sm501_devdata *sm,
822 unsigned long tmp; 825 unsigned long tmp;
823 826
824 tmp = readl(sm->regs + reg); 827 tmp = readl(sm->regs + reg);
825 tmp |= r->set;
826 tmp &= ~r->mask; 828 tmp &= ~r->mask;
829 tmp |= r->set;
827 writel(tmp, sm->regs + reg); 830 writel(tmp, sm->regs + reg);
828} 831}
829 832