From: Arnaud Patard Date: Mon, 10 Mar 2008 18:43:48 +0000 (-0700) Subject: gpio/pca953x bugfix: mark as can_sleep X-Git-Tag: v2.6.25-rc6~64 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=842078054da2d754c6b998b116d7c468abbfaaca;p=linux-2.6 gpio/pca953x bugfix: mark as can_sleep The pca953x driver is an I2C driver so gpio_chip->can_sleep should be set. This lets upper layers know they should use the gpio_*_cansleep() calls to access values, and may not access them from nonsleeping contexts. Signed-off-by: Arnaud Patard Signed-off-by: David Brownell Acked-by: "eric miao" Cc: Jean Delvare Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c index 92583cd4bf..6e72fd3118 100644 --- a/drivers/gpio/pca953x.c +++ b/drivers/gpio/pca953x.c @@ -184,6 +184,7 @@ static void pca953x_setup_gpio(struct pca953x_chip *chip, int gpios) gc->direction_output = pca953x_gpio_direction_output; gc->get = pca953x_gpio_get_value; gc->set = pca953x_gpio_set_value; + gc->can_sleep = 1; gc->base = chip->gpio_start; gc->ngpio = gpios;