Skip to content

gpio: use resource management for irq descriptors

Bartosz Golaszewski linux-gpio linux-omap lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 18 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12gpio: mockup: use devm_irq_alloc_descs()drivers/gpio/gpio-mockup.c+1 -152 replies
2/12gpio: twl4030: use devm_irq_alloc_descs()drivers/gpio/gpio-twl4030.c+2 -11 reply
3/12gpio: omap: use devm_irq_alloc_descs()drivers/gpio/gpio-omap.c+2 -12 replies
4/12gpio: pch: use resource management for irqsdrivers/gpio/gpio-pch.c+4 -101 reply
5/12gpio: ml-ioh: use resource management for irqsdrivers/gpio/gpio-ml-ioh.c+7 -211 reply
6/12gpio: xlp: use resource management for irqsdrivers/gpio/gpio-xlp.c+4 -41 reply
7/12gpio: pxa: use devm_irq_alloc_descs()drivers/gpio/gpio-pxa.c+1 -12 replies
8/12gpio: davinci: use devm_irq_alloc_descs()drivers/gpio/gpio-davinci.c+1 -12 replies
9/12gpio: sodaville: use resource management for irqsdrivers/gpio/gpio-sodaville.c+11 -171 reply
10/12gpio: mxc: use devm_irq_alloc_descs()drivers/gpio/gpio-mxc.c+2 -41 reply
11/12gpio: mxs: use devm_irq_alloc_descs()drivers/gpio/gpio-mxs.c+2 -41 reply
12/12gpio: sta2x11: use resource management for irqsdrivers/gpio/gpio-sta2x11.c+6 -111 reply

Reviews trailers per patch

3 of 12 patches have a Reviewed-by or Acked-by.

PatchRobert JarzmikKeerthyBamvor Jian Zhang
1/12R-b
2/12
3/12
4/12
5/12
6/12
7/12A-b
8/12A-b
9/12
10/12
11/12
12/12

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 00/12] gpio: use resource management for irq descriptors

The following series uses the recently introduced set of devm_irq_alloc_desc*() helpers in the GPIO drivers.

While we're at it: if the modified drivers called request_irq(), it was changed to devm_request_irq() too.

Some drivers correctly clean up resources (e.g. gpio-mockup, gpio-pch) - for them this change leads to an actual code shrink.

Other drivers are meant to be built-in and the devices they control are never removed (e.g. gpio-pxa, gpio-davinci), so they deliberately omit the cleanup. Still: in case something changes it's better to free the resources - especially since these drivers already use other devm_* routines like devm_kzalloc() etc.

The last group of drivers are the ones which can be compiled as modules, but leak resources unintentionally (e.g. gpio-twl4030, gpio-omap). This change fixes the interrupt descriptor leaks, but some drivers will require additional work since they still don't release other resources.

The following drivers were tested: gpio-mockup, gpio-omap and gpio-davinci. The rest was compile-tested only.

Bartosz Golaszewski (12):
gpio: mockup: use devm_irq_alloc_descs()
gpio: twl4030: use devm_irq_alloc_descs()
gpio: omap: use devm_irq_alloc_descs()
gpio: pch: use resource management for irqs
gpio: ml-ioh: use resource management for irqs
gpio: xlp: use resource management for irqs
gpio: pxa: use devm_irq_alloc_descs()
gpio: davinci: use devm_irq_alloc_descs()
gpio: sodaville: use resource management for irqs
gpio: mxc: use devm_irq_alloc_descs()
gpio: mxs: use devm_irq_alloc_descs()
gpio: sta2x11: use resource management for irqs

 drivers/gpio/gpio-davinci.c   |  2 +-
 drivers/gpio/gpio-ml-ioh.c    | 28 +++++++---------------------
 drivers/gpio/gpio-mockup.c    | 16 +---------------
 drivers/gpio/gpio-mxc.c       |  6 ++----
 drivers/gpio/gpio-mxs.c       |  6 ++----
 drivers/gpio/gpio-omap.c      |  3 ++-
 drivers/gpio/gpio-pch.c       | 14 ++++----------
 drivers/gpio/gpio-pxa.c       |  2 +-
 drivers/gpio/gpio-sodaville.c | 28 +++++++++++-----------------
 drivers/gpio/gpio-sta2x11.c   | 17 ++++++-----------
 drivers/gpio/gpio-twl4030.c   |  3 ++-
 drivers/gpio/gpio-xlp.c       |  8 ++++----
 12 files changed, 43 insertions(+), 90 deletions(-)
Signature · 1 line
2.9.3