Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b4b84826 authored by Roland Stigge's avatar Roland Stigge Committed by Mark Brown
Browse files

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: default avatarShiraz Hashim <shiraz.linux.kernel@gmail.com>
Signed-off-by: default avatarRoland Stigge <stigge@antcom.de>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 38e271cd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment