mfd: 88pm80x: Double shifting bug in suspend/resume
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 4 Aug 2016 05:26:56 +0000 (08:26 +0300)
committerWilly Tarreau <w@1wt.eu>
Fri, 10 Feb 2017 10:04:07 +0000 (11:04 +0100)
commita28d835844a523e0e0a96eb25b10a037b7662f1f
tree76ab758492e36613910501cb3957f02757f6541f
parent940d1175de7c31e8e2ac20489b7d2df4963bb4da
mfd: 88pm80x: Double shifting bug in suspend/resume

commit 9a6dc644512fd083400a96ac4a035ac154fe6b8d upstream.

set_bit() and clear_bit() take the bit number so this code is really
doing "1 << (1 << irq)" which is a double shift bug.  It's done
consistently so it won't cause a problem unless "irq" is more than 4.

Fixes: 70c6cce04066 ('mfd: Support 88pm80x in 80x driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
include/linux/mfd/88pm80x.h