Commit 0aeee5d4 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Samuel Ortiz

mfd: Fix pcf50633 bitfield logic in interrupt handler

Those constants are alreay bitfields.
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent e4be3cb7
...@@ -354,18 +354,18 @@ static void pcf50633_irq_worker(struct work_struct *work) ...@@ -354,18 +354,18 @@ static void pcf50633_irq_worker(struct work_struct *work)
if (pcf_int[0] & (PCF50633_INT1_USBINS | PCF50633_INT1_USBREM)) { if (pcf_int[0] & (PCF50633_INT1_USBINS | PCF50633_INT1_USBREM)) {
chgstat = pcf50633_reg_read(pcf, PCF50633_REG_MBCS2); chgstat = pcf50633_reg_read(pcf, PCF50633_REG_MBCS2);
if (chgstat & (0x3 << 4)) if (chgstat & (0x3 << 4))
pcf_int[0] &= ~(1 << PCF50633_INT1_USBREM); pcf_int[0] &= ~PCF50633_INT1_USBREM;
else else
pcf_int[0] &= ~(1 << PCF50633_INT1_USBINS); pcf_int[0] &= ~PCF50633_INT1_USBINS;
} }
/* Make sure only one of ADPINS or ADPREM is set */ /* Make sure only one of ADPINS or ADPREM is set */
if (pcf_int[0] & (PCF50633_INT1_ADPINS | PCF50633_INT1_ADPREM)) { if (pcf_int[0] & (PCF50633_INT1_ADPINS | PCF50633_INT1_ADPREM)) {
chgstat = pcf50633_reg_read(pcf, PCF50633_REG_MBCS2); chgstat = pcf50633_reg_read(pcf, PCF50633_REG_MBCS2);
if (chgstat & (0x3 << 4)) if (chgstat & (0x3 << 4))
pcf_int[0] &= ~(1 << PCF50633_INT1_ADPREM); pcf_int[0] &= ~PCF50633_INT1_ADPREM;
else else
pcf_int[0] &= ~(1 << PCF50633_INT1_ADPINS); pcf_int[0] &= ~PCF50633_INT1_ADPINS;
} }
dev_dbg(pcf->dev, "INT1=0x%02x INT2=0x%02x INT3=0x%02x " dev_dbg(pcf->dev, "INT1=0x%02x INT2=0x%02x INT3=0x%02x "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment