gpio: pm8xxx-gpio: pm8xxx-mpp: set can_sleep=0 for GPIO and MPP drivers
All gpiolib callback functions in the pm8xxx-gpio and pm8xxx-mpp
drivers can be called from atomic context. Therefore, the
can_sleep gpio_chip parameter for these drivers can be safely set
to 0. Thus, change the can_sleep value to 0 for both of these
drivers when the gpio_chip is registered in their probe
functions. This will remove gpiolib warning messages that are
generated when calling gpio_set_value from atomic context.
Change-Id: I8beb381f009f7e1b51d3e0cb003e532685c75c4a
Signed-off-by: David Collins <collinsd@codeaurora.org>
diff --git a/drivers/gpio/pm8xxx-gpio.c b/drivers/gpio/pm8xxx-gpio.c
index 53305e3..f317c37 100644
--- a/drivers/gpio/pm8xxx-gpio.c
+++ b/drivers/gpio/pm8xxx-gpio.c
@@ -1,7 +1,7 @@
/*
* Qualcomm PMIC8XXX GPIO driver
*
- * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -302,7 +302,7 @@
pm_gpio_chip->gpio_chip.set = pm_gpio_write;
pm_gpio_chip->gpio_chip.dbg_show = pm_gpio_dbg_show;
pm_gpio_chip->gpio_chip.ngpio = pdata->gpio_cdata.ngpios;
- pm_gpio_chip->gpio_chip.can_sleep = 1;
+ pm_gpio_chip->gpio_chip.can_sleep = 0;
pm_gpio_chip->gpio_chip.dev = &pdev->dev;
pm_gpio_chip->gpio_chip.base = pdata->gpio_base;
pm_gpio_chip->irq_base = platform_get_irq(pdev, 0);