From patchwork Tue Nov 15 22:39:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keno Fischer X-Patchwork-Id: 695316 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3tJMlX5QMrz9sCZ for ; Wed, 16 Nov 2016 09:39:52 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=juliacomputing-com.20150623.gappssmtp.com header.i=@juliacomputing-com.20150623.gappssmtp.com header.b="Czx5ypou"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752445AbcKOWjI (ORCPT ); Tue, 15 Nov 2016 17:39:08 -0500 Received: from mail-qt0-f170.google.com ([209.85.216.170]:36521 "EHLO mail-qt0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932797AbcKOWjF (ORCPT ); Tue, 15 Nov 2016 17:39:05 -0500 Received: by mail-qt0-f170.google.com with SMTP id w33so85234238qtc.3 for ; Tue, 15 Nov 2016 14:39:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juliacomputing-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=GddcaJErod9x60gUAgOwE/GamUv5gLE3ILYNX+r6/ZM=; b=Czx5ypouiDXCXBbrTswp5atXzMaBw00BmXxF+0AN3GUxsVNp+qZqiDYnGW8SWPqMWG v2OZO6mtQ/bca0ktKxqA9j2je+9umhSbxU7u2e1pD9bO0Xq2O/sTAZKXet0EPZGUdpfm ewKCGOfKbL73AkcWLV8Ddu2QAvmMI6ISeA83OwSp94Xf3XsHHyIjSeqO2xAp48LwQw4i JUSKw152yhU4TCYKQjiCQZk+zdrpqrxCBaYX3m+orGU7WxWWteV7gZb59s9h88HY1JEX lZohXPD6NqVdXTWD/yAgyCtJ/V3KAbwjleyLZp6HXY3DvUpqtgNexd1odO6jL+Ak7iaW z0bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=GddcaJErod9x60gUAgOwE/GamUv5gLE3ILYNX+r6/ZM=; b=R6PjqcVTCK8FCcSq0gYuXf8Lc7WmH2bC454xEj5PBCrRVkrktlLq3i8BiQmLcV1rqO 4UTehxub1qKpexw8r5JIy3TSH7DEskMxUtXMfD0FrL77Hbe9AeEnYrA6Eo8vdRlk+tnQ OfhKmRHwpfEmhm8CmQp4YPGbPLgyScKnwN1NHyu2XJRNfw11GUnlzBIyFXIj/t5caCAM 3H4lBjPF2B3KkZk7HGqbEu8bSdtvS3VOGm4qVEymGCcxIc8fEj42QKd/J5x30DkdTrMR PG+9DdqLmU2ovDSm/haqjXFmZvLS4jtzKtRiA64VbmupZeIbyhGZFVKPWnVPMnOcHmr3 JRAQ== X-Gm-Message-State: ABUngvd6gdRAQ9LfIzBbnOb2O5ZQMD62FnyGflKitIocZfm/repe/A8IFqwaWWvht9sO1WK1 X-Received: by 10.200.46.117 with SMTP id s50mr14986718qta.103.1479249544697; Tue, 15 Nov 2016 14:39:04 -0800 (PST) Received: from juliacomputing.com ([2601:184:4380:e6e:f1b6:4c2b:fe7e:d4f8]) by smtp.gmail.com with ESMTPSA id 6sm16149475qke.18.2016.11.15.14.39.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Nov 2016 14:39:04 -0800 (PST) Date: Tue, 15 Nov 2016 17:39:02 -0500 From: Keno Fischer To: linux-kernel@vger.kernel.org Cc: linus.walleij@linaro.org, gnurou@gmail.com, linux-gpio@vger.kernel.org, jdike@addtoit.com, richard@nod.at, user-mode-linux-devel@lists.sourceforge.net, shawn.guo@linaro.org, acourbot@nvidia.com Subject: [PATCH v2] gpio: Remove GPIO_DEVRES option Message-ID: <20161115223902.GA8347@juliacomputing.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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