On Sat, Dec 21, 2013 at 11:49 AM, Rashika Kheria <rashika.khe...@gmail.com> wrote:
> Remove unused devm_*_put functions because none of them are > used anywhere in the kernel and devm does automatic cleanup > of resources and requires no manual cleanup. > > Signed-off-by: Rashika Kheria <rashika.khe...@gmail.com> > Reviewed-by: Josh Triplett <j...@joshtriplett.org> > drivers/gpio/devres.c | 25 ------------------------- > include/linux/gpio/consumer.h | 9 --------- Can you please split these two hunks on the patch into a separate patch I can apply to the GPIO tree? > -static int devm_gpiod_match(struct device *dev, void *res, void *data) > -{ > - struct gpio_desc **this = res, **gpio = data; > - > - return *this == *gpio; > -} (...) > -/** > - * devm_gpiod_put - Resource-managed gpiod_put() > - * @desc: GPIO descriptor to dispose of > - * > - * Dispose of a GPIO descriptor obtained with devm_gpiod_get() or > - * devm_gpiod_get_index(). Normally this function will not be called as the > GPIO > - * will be disposed of by the resource management code. > - */ > -void devm_gpiod_put(struct device *dev, struct gpio_desc *desc) > -{ > - WARN_ON(devres_release(dev, devm_gpiod_release, devm_gpiod_match, > - &desc)); > -} > -EXPORT_SYMBOL(devm_gpiod_put); Alexandre what do you think about this? Can we think of a scenario where explicit garbage collection is going to be needed or should we remove this for now? Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/