gpio: Prevent an integer overflow in the pca953x driver
authorJoshua Scott <joshua.scott@alliedtelesis.co.nz>
Fri, 22 May 2015 00:35:12 +0000 (12:35 +1200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 1 Jun 2015 14:53:55 +0000 (16:53 +0200)
commitb6ac1280b6969607c5a01e316cc4ab693490c333
tree08f9f9f49b0014d3942d9cf34b5280aff50239ef
parent121dcb760426ca67ee90a8b2db6a75eee010f8e3
gpio: Prevent an integer overflow in the pca953x driver

Interrupts were missed if an 8-bit integer overflow occurred. This was
observed when bank0,pin7 and bank1,pin7 changed simultaniously.

As the 8-bit totals were only checked against zero, replace them with
booleans. Name the booleans so that their purpose is clear.

Signed-off-by: Joshua Scott <joshua.scott@alliedtelesis.co.nz>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-pca953x.c