From patchwork Thu Jul 23 07:10:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 51383 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by patches.linaro.org (Postfix) with ESMTPS id D3EE420323 for ; Thu, 23 Jul 2015 07:10:11 +0000 (UTC) Received: by lbcjf8 with SMTP id jf8sf63856738lbc.0 for ; Thu, 23 Jul 2015 00:10:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=irHKqrIiOcNTbXtUTjvPld4rHkjq25E6azIdquKzeEQ=; b=mWO0oi5WFoNOktLvXo4IbOWboBcz4XnPFkYbjgp2Uef4hOehM3lmckot5QK69XU2jn p+wntISibCM0MzmLeXmPrfvAi6DXoJunEJ5yTvL7BCD3UW5Lu6zACxY1AFSwhwmON5M2 hV7yZ1KYswK0vxxcu0TcS6e2ZDOng1BcavYIE+I8BGIClubb8602GTe8D3k/x4kNSuAo rFVESfuFE5kHTMdVkucoRwjmCEkGZNl1DYEmmkWm+HpqAt8uhYLOltRZTzqY0cKqCHqT bqYrFM29lJWvwacxH/uc8DQDS+8FY81NnXp+CNGbml7a15I0Q99g8DWY1Gbe6OUlGVRn na4A== X-Gm-Message-State: ALoCoQk4WX8Kbdms0HiPB3UeDbeWziQqWoXmIw3gQhnvwVYhX8tNYPQEFdoIf/BGexI/0j8riyfm X-Received: by 10.152.88.111 with SMTP id bf15mr3028608lab.9.1437635410816; Thu, 23 Jul 2015 00:10:10 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.5.9 with SMTP id ci9ls198973lad.69.gmail; Thu, 23 Jul 2015 00:10:10 -0700 (PDT) X-Received: by 10.152.9.5 with SMTP id v5mr5989376laa.111.1437635410641; Thu, 23 Jul 2015 00:10:10 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id tk4si3313148lbb.14.2015.07.23.00.10.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jul 2015 00:10:10 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by lblf12 with SMTP id f12so151311243lbl.2 for ; Thu, 23 Jul 2015 00:10:10 -0700 (PDT) X-Received: by 10.152.120.135 with SMTP id lc7mr5962875lab.41.1437635410294; Thu, 23 Jul 2015 00:10:10 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp372373lba; Thu, 23 Jul 2015 00:10:09 -0700 (PDT) X-Received: by 10.70.3.98 with SMTP id b2mr15301766pdb.107.1437635408651; Thu, 23 Jul 2015 00:10:08 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bg17si9704567pad.159.2015.07.23.00.10.07; Thu, 23 Jul 2015 00:10:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752554AbbGWHKH (ORCPT + 2 others); Thu, 23 Jul 2015 03:10:07 -0400 Received: from mail-lb0-f171.google.com ([209.85.217.171]:34900 "EHLO mail-lb0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751173AbbGWHKG (ORCPT ); Thu, 23 Jul 2015 03:10:06 -0400 Received: by lblf12 with SMTP id f12so151309807lbl.2 for ; Thu, 23 Jul 2015 00:10:05 -0700 (PDT) X-Received: by 10.153.7.166 with SMTP id dd6mr6124553lad.42.1437635404958; Thu, 23 Jul 2015 00:10:04 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by smtp.gmail.com with ESMTPSA id 4sm794376lai.36.2015.07.23.00.10.02 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jul 2015 00:10:03 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Alexandre Courbot , Linus Walleij Subject: [PATCH 5/5] pinctrl: nomadik: depromote GPIO to subsystem_init() Date: Thu, 23 Jul 2015 09:10:00 +0200 Message-Id: <1437635400-23509-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.4.3 Sender: linux-gpio-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-gpio@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , We no longer have to do GPIO initialization before the pinctrl initialization, instead we can initialize the pinctrl portions of the driver first and then the GPIO. Thus we can move GPIO initialization to a subsystem_initcall(), but not yet to a device_initcall(). Signed-off-by: Linus Walleij --- drivers/pinctrl/nomadik/pinctrl-nomadik.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.c b/drivers/pinctrl/nomadik/pinctrl-nomadik.c index 3f53213cf89e..45c077fbe124 100644 --- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c +++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c @@ -2104,15 +2104,15 @@ static struct platform_driver nmk_pinctrl_driver = { static int __init nmk_gpio_init(void) { - int ret; + return platform_driver_register(&nmk_gpio_driver); +} +subsys_initcall(nmk_gpio_init); - ret = platform_driver_register(&nmk_gpio_driver); - if (ret) - return ret; +static int __init nmk_pinctrl_init(void) +{ return platform_driver_register(&nmk_pinctrl_driver); } - -core_initcall(nmk_gpio_init); +core_initcall(nmk_pinctrl_init); MODULE_AUTHOR("Prafulla WADASKAR and Alessandro Rubini"); MODULE_DESCRIPTION("Nomadik GPIO Driver");