spi/pl022: Fix chipselects pointer computation
The new chip select handling via GPIO introduced a pointer computation bug: (int *) pl022 + sizeof(struct pl022) doesn't point to the data immediately after the actual struct pl022 (as was intended) but to a multiple of bytes after it because of the (int *) type. Replacing the kludgy pointer arithmetic with managed memory allocation for the chip selects. Reported-by: NShiraz Hashim <shiraz.linux.kernel@gmail.com> Signed-off-by: NRoland Stigge <stigge@antcom.de> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Showing
想要评论请 注册 或 登录