diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpio/gpiolib.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 6a6bd569e1f8..1a8c18cbf201 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c | |||
@@ -1272,7 +1272,7 @@ void gpio_free(unsigned gpio) | |||
1272 | if (chip && test_bit(FLAG_REQUESTED, &desc->flags)) { | 1272 | if (chip && test_bit(FLAG_REQUESTED, &desc->flags)) { |
1273 | if (chip->free) { | 1273 | if (chip->free) { |
1274 | spin_unlock_irqrestore(&gpio_lock, flags); | 1274 | spin_unlock_irqrestore(&gpio_lock, flags); |
1275 | might_sleep_if(extra_checks && chip->can_sleep); | 1275 | might_sleep_if(chip->can_sleep); |
1276 | chip->free(chip, gpio - chip->base); | 1276 | chip->free(chip, gpio - chip->base); |
1277 | spin_lock_irqsave(&gpio_lock, flags); | 1277 | spin_lock_irqsave(&gpio_lock, flags); |
1278 | } | 1278 | } |
@@ -1410,7 +1410,7 @@ int gpio_direction_input(unsigned gpio) | |||
1410 | 1410 | ||
1411 | spin_unlock_irqrestore(&gpio_lock, flags); | 1411 | spin_unlock_irqrestore(&gpio_lock, flags); |
1412 | 1412 | ||
1413 | might_sleep_if(extra_checks && chip->can_sleep); | 1413 | might_sleep_if(chip->can_sleep); |
1414 | 1414 | ||
1415 | if (status) { | 1415 | if (status) { |
1416 | status = chip->request(chip, gpio); | 1416 | status = chip->request(chip, gpio); |
@@ -1463,7 +1463,7 @@ int gpio_direction_output(unsigned gpio, int value) | |||
1463 | 1463 | ||
1464 | spin_unlock_irqrestore(&gpio_lock, flags); | 1464 | spin_unlock_irqrestore(&gpio_lock, flags); |
1465 | 1465 | ||
1466 | might_sleep_if(extra_checks && chip->can_sleep); | 1466 | might_sleep_if(chip->can_sleep); |
1467 | 1467 | ||
1468 | if (status) { | 1468 | if (status) { |
1469 | status = chip->request(chip, gpio); | 1469 | status = chip->request(chip, gpio); |
@@ -1521,7 +1521,7 @@ int gpio_set_debounce(unsigned gpio, unsigned debounce) | |||
1521 | 1521 | ||
1522 | spin_unlock_irqrestore(&gpio_lock, flags); | 1522 | spin_unlock_irqrestore(&gpio_lock, flags); |
1523 | 1523 | ||
1524 | might_sleep_if(extra_checks && chip->can_sleep); | 1524 | might_sleep_if(chip->can_sleep); |
1525 | 1525 | ||
1526 | return chip->set_debounce(chip, gpio, debounce); | 1526 | return chip->set_debounce(chip, gpio, debounce); |
1527 | 1527 | ||
@@ -1571,7 +1571,7 @@ int __gpio_get_value(unsigned gpio) | |||
1571 | struct gpio_chip *chip; | 1571 | struct gpio_chip *chip; |
1572 | 1572 | ||
1573 | chip = gpio_to_chip(gpio); | 1573 | chip = gpio_to_chip(gpio); |
1574 | WARN_ON(extra_checks && chip->can_sleep); | 1574 | WARN_ON(chip->can_sleep); |
1575 | return chip->get ? chip->get(chip, gpio - chip->base) : 0; | 1575 | return chip->get ? chip->get(chip, gpio - chip->base) : 0; |
1576 | } | 1576 | } |
1577 | EXPORT_SYMBOL_GPL(__gpio_get_value); | 1577 | EXPORT_SYMBOL_GPL(__gpio_get_value); |
@@ -1590,7 +1590,7 @@ void __gpio_set_value(unsigned gpio, int value) | |||
1590 | struct gpio_chip *chip; | 1590 | struct gpio_chip *chip; |
1591 | 1591 | ||
1592 | chip = gpio_to_chip(gpio); | 1592 | chip = gpio_to_chip(gpio); |
1593 | WARN_ON(extra_checks && chip->can_sleep); | 1593 | WARN_ON(chip->can_sleep); |
1594 | chip->set(chip, gpio - chip->base, value); | 1594 | chip->set(chip, gpio - chip->base, value); |
1595 | } | 1595 | } |
1596 | EXPORT_SYMBOL_GPL(__gpio_set_value); | 1596 | EXPORT_SYMBOL_GPL(__gpio_set_value); |