]> git.baikalelectronics.ru Git - kernel.git/commit
spi: sprd: Fix the possible negative value of BIT()
authorBaolin Wang <baolin.wang@linaro.org>
Wed, 25 Oct 2017 11:25:09 +0000 (19:25 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 25 Oct 2017 12:00:03 +0000 (14:00 +0200)
commitfaff41088f7413f82e2498ded26dcf9a4357f08f
tree0529a9106aefb1366c480348b81e446e3db585a3
parentd67b1baef166562a4c3f3588e85a4b7bab732d45
spi: sprd: Fix the possible negative value of BIT()

When enabling the ADI hardware channels, if the channel id is 31,
then we will get one negative value -1 for BIT() macro, which will
write incorrect value to register.

Fixes: cb25d193413c ("spi: Add ADI driver for Spreadtrum platform")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-sprd-adi.c