diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-20 11:25:44 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-20 11:25:44 -0400 |
commit | af52739b922f656eb1f39016fabaabe4baeda2e2 (patch) | |
tree | 79a7aa810d0493cd0cf4adebac26d37f12e8b545 /drivers/gpio/gpiolib.c | |
parent | 25ed6a5e97809129a1bc852b6b5c7d03baa112c4 (diff) | |
parent | 33688abb2802ff3a230bd2441f765477b94cc89e (diff) |
Merge 4.7-rc4 into staging-next
We want the fixes in here, and we can resolve a merge issue in
drivers/iio/industrialio-trigger.c
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpio/gpiolib.c')
-rw-r--r-- | drivers/gpio/gpiolib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 24f60d28f0c0..58d822d7e8da 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c | |||
@@ -449,7 +449,6 @@ static void gpiodevice_release(struct device *dev) | |||
449 | { | 449 | { |
450 | struct gpio_device *gdev = dev_get_drvdata(dev); | 450 | struct gpio_device *gdev = dev_get_drvdata(dev); |
451 | 451 | ||
452 | cdev_del(&gdev->chrdev); | ||
453 | list_del(&gdev->list); | 452 | list_del(&gdev->list); |
454 | ida_simple_remove(&gpio_ida, gdev->id); | 453 | ida_simple_remove(&gpio_ida, gdev->id); |
455 | kfree(gdev->label); | 454 | kfree(gdev->label); |
@@ -482,7 +481,6 @@ static int gpiochip_setup_dev(struct gpio_device *gdev) | |||
482 | 481 | ||
483 | /* From this point, the .release() function cleans up gpio_device */ | 482 | /* From this point, the .release() function cleans up gpio_device */ |
484 | gdev->dev.release = gpiodevice_release; | 483 | gdev->dev.release = gpiodevice_release; |
485 | get_device(&gdev->dev); | ||
486 | pr_debug("%s: registered GPIOs %d to %d on device: %s (%s)\n", | 484 | pr_debug("%s: registered GPIOs %d to %d on device: %s (%s)\n", |
487 | __func__, gdev->base, gdev->base + gdev->ngpio - 1, | 485 | __func__, gdev->base, gdev->base + gdev->ngpio - 1, |
488 | dev_name(&gdev->dev), gdev->chip->label ? : "generic"); | 486 | dev_name(&gdev->dev), gdev->chip->label ? : "generic"); |
@@ -770,6 +768,8 @@ void gpiochip_remove(struct gpio_chip *chip) | |||
770 | * be removed, else it will be dangling until the last user is | 768 | * be removed, else it will be dangling until the last user is |
771 | * gone. | 769 | * gone. |
772 | */ | 770 | */ |
771 | cdev_del(&gdev->chrdev); | ||
772 | device_del(&gdev->dev); | ||
773 | put_device(&gdev->dev); | 773 | put_device(&gdev->dev); |
774 | } | 774 | } |
775 | EXPORT_SYMBOL_GPL(gpiochip_remove); | 775 | EXPORT_SYMBOL_GPL(gpiochip_remove); |
@@ -869,7 +869,7 @@ struct gpio_chip *gpiochip_find(void *data, | |||
869 | 869 | ||
870 | spin_lock_irqsave(&gpio_lock, flags); | 870 | spin_lock_irqsave(&gpio_lock, flags); |
871 | list_for_each_entry(gdev, &gpio_devices, list) | 871 | list_for_each_entry(gdev, &gpio_devices, list) |
872 | if (match(gdev->chip, data)) | 872 | if (gdev->chip && match(gdev->chip, data)) |
873 | break; | 873 | break; |
874 | 874 | ||
875 | /* No match? */ | 875 | /* No match? */ |