[PATCH] ARM: s3c2442: Setup gpio {set,get}_pull callbacks

Ben Dooks ben at fluff.org
Mon Sep 20 19:41:15 EDT 2010


On 20/09/10 23:00, Lars-Peter Clausen wrote:
> Currently the {set,get}_pull callbacks of the s3c24xx_gpiocfg_default structure
> are not initalized for the s3c2442 cpu type. This results in a NULL-pointer
> deref upon calling s3c_gpio_setpull.
> 
> The s3c2442 has pulldowns instead of pullups compared to the s3c2440.
> The method of controlling them is the same though.
> So this patch modifies the existing s3c_gpio_{get,set}pull_1up helper functions
> to take an additional parameter deciding whether the pin has a pullup or
> pulldown.
> The s3c_gpio_{get,set}pull_1{down,up} functions then wrap that functions passing
> either S3C_GPIO_PULL_UP or S3C_GPIO_PULL_DOWN.
> 
> Furthermore this patch sets up the s3c24xx_gpiocfg_default.{get,set}_pull fields
> in the s3c2442 cpu init function to the new pulldown helper functions.
> 
> Signed-off-by: Lars-Peter Clausen <lars at metafoo.de>

Initial reading looks ok, will see about adding it to my -next tree.



More information about the linux-arm-kernel mailing list