linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] gpio: Remove GPIO_DEVRES option
@ 2016-11-15 22:39 Keno Fischer
  2016-11-16 19:49 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Keno Fischer @ 2016-11-15 22:39 UTC (permalink / raw)
  To: linux-kernel
  Cc: linus.walleij, gnurou, linux-gpio, jdike, richard,
	user-mode-linux-devel, shawn.guo, acourbot

This option was added in 6a89a314ab107a12af08c71420c19a37a30fc2d3 to allow use
of the devm_gpio_* functions without CONFIG_GPIOLIB. However, only a few months
later in b69ac52449c658b7ac40034dc3c5f5f4a71a723d, CONFIG_GPIOLIB, was added
as a dependency, defeating the original purpose of this option. Instead of
that patch, the original commit could have just been reverted (and in fact
was partially so in 403c1d0be5ccbd750d25c59d8358843a81e52e3b). Further,
since this option has a dependency on HAS_IOMEM, even though it does not
require it, it causes build failures when !HAS_IOMEM (e.g. in a uml build).
Fix that by completely removing the option, in essence completing the
reversion of the original commit.
---

In the original version of this patch (http://marc.info/?l=linux-gpio&m=147874300313315&w=2),
I had kept the option, and just fixed the build failure. However,
Linus Walleij pointed out (and the git history agrees) that this
option is now obsolete and should just be removed.

Also, while here I should note that there was a `might_sleep();` in the
stub for `devm_gpio_free`, that was not reintroduced when the stub was
brought back. Not sure this makes a difference, it felt worth pointing
out to the maintainers.

 drivers/gpio/Kconfig  | 4 ----
 drivers/gpio/Makefile | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index d011cb8..ed37e59 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -22,10 +22,6 @@ menuconfig GPIOLIB
 
 if GPIOLIB
 
-config GPIO_DEVRES
-	def_bool y
-	depends on HAS_IOMEM
-
 config OF_GPIO
 	def_bool y
 	depends on OF
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index ab28a2d..d074c22 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -2,7 +2,7 @@
 
 ccflags-$(CONFIG_DEBUG_GPIO)	+= -DDEBUG
 
-obj-$(CONFIG_GPIO_DEVRES)	+= devres.o
+obj-$(CONFIG_GPIOLIB)		+= devres.o
 obj-$(CONFIG_GPIOLIB)		+= gpiolib.o
 obj-$(CONFIG_GPIOLIB)		+= gpiolib-legacy.o
 obj-$(CONFIG_OF_GPIO)		+= gpiolib-of.o
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] gpio: Remove GPIO_DEVRES option
  2016-11-15 22:39 [PATCH v2] gpio: Remove GPIO_DEVRES option Keno Fischer
@ 2016-11-16 19:49 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2016-11-16 19:49 UTC (permalink / raw)
  To: Keno Fischer
  Cc: linux-kernel, Alexandre Courbot, linux-gpio, jdike,
	Richard Weinberger, user-mode-linux-devel, Shawn Guo,
	Alexandre Courbot

On Tue, Nov 15, 2016 at 11:39 PM, Keno Fischer <keno@juliacomputing.com> wrote:

> This option was added in 6a89a314ab107a12af08c71420c19a37a30fc2d3 to allow use
> of the devm_gpio_* functions without CONFIG_GPIOLIB. However, only a few months
> later in b69ac52449c658b7ac40034dc3c5f5f4a71a723d, CONFIG_GPIOLIB, was added
> as a dependency, defeating the original purpose of this option. Instead of
> that patch, the original commit could have just been reverted (and in fact
> was partially so in 403c1d0be5ccbd750d25c59d8358843a81e52e3b). Further,
> since this option has a dependency on HAS_IOMEM, even though it does not
> require it, it causes build failures when !HAS_IOMEM (e.g. in a uml build).
> Fix that by completely removing the option, in essence completing the
> reversion of the original commit.

I split up this terse commit message a bit and added your
Signed-off-by and applied for fixes.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-16 19:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-15 22:39 [PATCH v2] gpio: Remove GPIO_DEVRES option Keno Fischer
2016-11-16 19:49 ` Linus Walleij

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