Skip to content

gpio: Utilize devm_ functions in driver probe callbacks

William Breathitt Gray linux-gpio lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5gpio: 104-dio-48e: Utilize devm_ functions in driver probe callbackdrivers/gpio/gpio-104-dio-48e.c+5 -221 reply
2/5gpio: 104-idi-48: Utilize devm_ functions in driver probe callbackdrivers/gpio/gpio-104-idi-48.c+5 -231 reply
3/5gpio: 104-idio-16: Utilize devm_ functions in driver probe callbackdrivers/gpio/gpio-104-idio-16.c+5 -221 reply
4/5gpio: gpio-mm: Utilize devm_ functions in driver probe callbackdrivers/gpio/gpio-gpio-mm.c+1 -111 reply
5/5gpio: ws16c48: Utilize devm_ functions in driver probe callbackdrivers/gpio/gpio-ws16c48.c+5 -231 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] gpio: Utilize devm_ functions in driver probe callbacks

The devm_ resource manager functions allow memory to be automatically released when a device is unbound. This patchset takes advantage of the resource manager functions and replaces gpiochip_add_data calls and request_irq calls with devm_gpiochip_add_data calls and devm_request_irq calls respectively.

A convenient outcome of these changes is the removal of the respective driver remove callback functions for these drivers; now that clean-up is handled automatically when devices are unbound, custom driver remove functions are no longer necessary for these drivers.

William Breathitt Gray (5):
gpio: 104-dio-48e: Utilize devm_ functions in driver probe callback
gpio: 104-idi-48: Utilize devm_ functions in driver probe callback
gpio: 104-idio-16: Utilize devm_ functions in driver probe callback
gpio: gpio-mm: Utilize devm_ functions in driver probe callback
gpio: ws16c48: Utilize devm_ functions in driver probe callback

 drivers/gpio/gpio-104-dio-48e.c | 27 +++++----------------------
 drivers/gpio/gpio-104-idi-48.c  | 28 +++++-----------------------
 drivers/gpio/gpio-104-idio-16.c | 27 +++++----------------------
 drivers/gpio/gpio-gpio-mm.c     | 12 +-----------
 drivers/gpio/gpio-ws16c48.c     | 28 +++++-----------------------
 5 files changed, 21 insertions(+), 101 deletions(-)
Signature · 1 line
2.11.0