linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	Santosh Shilimkar <ssantosh@kernel.org>,
	Kevin Hilman <khilman@kernel.org>,
	Robert Jarzmik <robert.jarzmik@free.fr>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-omap@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>,
	Marc Zyngier <marc.zyngier@arm.com>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: [PATCH 00/12] gpio: use resource management for irq descriptors
Date: Sat,  4 Mar 2017 17:23:28 +0100	[thread overview]
Message-ID: <1488644620-11488-1-git-send-email-bgolaszewski@baylibre.com> (raw)

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(-)

-- 
2.9.3


             reply	other threads:[~2017-03-04 16:23 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-04 16:23 Bartosz Golaszewski [this message]
2017-03-04 16:23 ` [PATCH 01/12] gpio: mockup: use devm_irq_alloc_descs() Bartosz Golaszewski
2017-03-08  8:21   ` Bamvor Zhang Jian
2017-03-14 15:08   ` Linus Walleij
2017-03-04 16:23 ` [PATCH 02/12] gpio: twl4030: " Bartosz Golaszewski
2017-03-14 15:08   ` Linus Walleij
2017-03-04 16:23 ` [PATCH 03/12] gpio: omap: " Bartosz Golaszewski
2017-03-06 16:50   ` Tony Lindgren
2017-03-14 15:09   ` Linus Walleij
2017-03-04 16:23 ` [PATCH 04/12] gpio: pch: use resource management for irqs Bartosz Golaszewski
2017-03-14 15:10   ` Linus Walleij
2017-03-04 16:23 ` [PATCH 05/12] gpio: ml-ioh: " Bartosz Golaszewski
2017-03-14 15:11   ` Linus Walleij
2017-03-04 16:23 ` [PATCH 06/12] gpio: xlp: " Bartosz Golaszewski
2017-03-14 15:11   ` Linus Walleij
2017-03-04 16:23 ` [PATCH 07/12] gpio: pxa: use devm_irq_alloc_descs() Bartosz Golaszewski
2017-03-04 20:31   ` Robert Jarzmik
2017-03-14 15:12   ` Linus Walleij
2017-03-04 16:23 ` [PATCH 08/12] gpio: davinci: " Bartosz Golaszewski
2017-03-06  4:59   ` Keerthy
2017-03-14 15:13   ` Linus Walleij
2017-03-04 16:23 ` [PATCH 09/12] gpio: sodaville: use resource management for irqs Bartosz Golaszewski
2017-03-14 15:14   ` Linus Walleij
2017-03-04 16:23 ` [PATCH 10/12] gpio: mxc: use devm_irq_alloc_descs() Bartosz Golaszewski
2017-03-14 15:15   ` Linus Walleij
2017-03-04 16:23 ` [PATCH 11/12] gpio: mxs: " Bartosz Golaszewski
2017-03-14 15:16   ` Linus Walleij
2017-03-04 16:23 ` [PATCH 12/12] gpio: sta2x11: use resource management for irqs Bartosz Golaszewski
2017-03-14 15:16   ` Linus Walleij
2017-03-14 15:18 ` [PATCH 00/12] gpio: use resource management for irq descriptors Linus Walleij
2017-03-14 15:45   ` Bartosz Golaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1488644620-11488-1-git-send-email-bgolaszewski@baylibre.com \
    --to=bgolaszewski@baylibre.com \
    --cc=bamvor.zhangjian@linaro.org \
    --cc=gnurou@gmail.com \
    --cc=grygorii.strashko@ti.com \
    --cc=khilman@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=robert.jarzmik@free.fr \
    --cc=ssantosh@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).