Skip to content

Commit

Permalink
mfd: Fix pcf50633 bitfield logic in interrupt handler
Browse files Browse the repository at this point in the history
Those constants are alreay bitfields.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Lars-Peter Clausen authored and Samuel Ortiz committed May 27, 2010
1 parent e4be3cb commit 0aeee5d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/mfd/pcf50633-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,18 +354,18 @@ static void pcf50633_irq_worker(struct work_struct *work)
if (pcf_int[0] & (PCF50633_INT1_USBINS | PCF50633_INT1_USBREM)) {
chgstat = pcf50633_reg_read(pcf, PCF50633_REG_MBCS2);
if (chgstat & (0x3 << 4))
pcf_int[0] &= ~(1 << PCF50633_INT1_USBREM);
pcf_int[0] &= ~PCF50633_INT1_USBREM;
else
pcf_int[0] &= ~(1 << PCF50633_INT1_USBINS);
pcf_int[0] &= ~PCF50633_INT1_USBINS;
}

/* Make sure only one of ADPINS or ADPREM is set */
if (pcf_int[0] & (PCF50633_INT1_ADPINS | PCF50633_INT1_ADPREM)) {
chgstat = pcf50633_reg_read(pcf, PCF50633_REG_MBCS2);
if (chgstat & (0x3 << 4))
pcf_int[0] &= ~(1 << PCF50633_INT1_ADPREM);
pcf_int[0] &= ~PCF50633_INT1_ADPREM;
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 "
Expand Down

0 comments on commit 0aeee5d

Please sign in to comment.