gpio: 104-dio-48e: Utilize devm_ functions in driver probe callback
authorWilliam Breathitt Gray <vilhelm.gray@gmail.com>
Tue, 24 Jan 2017 20:00:31 +0000 (15:00 -0500)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 26 Jan 2017 14:52:38 +0000 (15:52 +0100)
commit00de1a518aebed3bcf44389cd5dae12a77ade726
tree97442518a7815f365302a8e6c4b80e1a8ea489e2
parent283a981387c498f846e89450bd83b2c349223b4f
gpio: 104-dio-48e: Utilize devm_ functions in driver probe callback

The devm_ resource manager functions allow memory to be automatically
released when a device is unbound. This patch takes advantage of the
resource manager functions and replaces the gpiochip_add_data call and
request_irq call with the devm_gpiochip_add_data call and
devm_request_irq call respectively. In addition, the dio48e_remove
function has been removed as no longer necessary due to the use of the
relevant devm_ resource manager functions.

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-104-dio-48e.c