From patchwork Fri Sep 28 21:36:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11868 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 972D523E42 for ; Fri, 28 Sep 2012 21:36:38 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 45BE0A18585 for ; Fri, 28 Sep 2012 21:36:38 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so8011818iej.11 for ; Fri, 28 Sep 2012 14:36:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-provags-id:x-gm-message-state; bh=Nu5ootKQZdIgrY+983DQmUKIcovwQ/s9h3bEtpjlZs0=; b=NDzxFiYCsNZ33yhgzOWODeRADMfzJecMLihXYAAl2EbZMia69AVUHvpso/xtGp6Eym DMN6l6xMxKo+9pvCiSNqtFZAWFzkuDr5GrIYXPm7A1RZb1Cm3fzVUgYbJdhV3tCkDFZg QQpKaokxbYKlvjeecbIdm3dcd7sWjKkZN6d5C/MFJbN1svqFMvixcpMLW3PNr8GEXadX OBwClIbG7hD04xTN/m1T9bJss0saajm35XtmJrcCDXrANK11K1XU9/SJFYioltqWlQDA C/AFTK/ywubB174ChvJifp0k6F/2vDF+0fSbuTRf5o3CKtPIY5/A07EBa7Zfve/aK/6d TFVA== Received: by 10.50.217.227 with SMTP id pb3mr25795igc.28.1348868198056; Fri, 28 Sep 2012 14:36:38 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp495017igc; Fri, 28 Sep 2012 14:36:37 -0700 (PDT) Received: by 10.216.9.162 with SMTP id 34mr3669551wet.85.1348868196363; Fri, 28 Sep 2012 14:36:36 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de. [212.227.17.10]) by mx.google.com with ESMTPS id o16si1901992wiw.25.2012.09.28.14.36.35 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 28 Sep 2012 14:36:36 -0700 (PDT) Received-SPF: neutral (google.com: 212.227.17.10 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.17.10; Authentication-Results: mx.google.com; spf=neutral (google.com: 212.227.17.10 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) smtp.mail=arnd@arndb.de Received: from localhost.localdomain (HSI-KBW-149-172-5-253.hsi13.kabel-badenwuerttemberg.de [149.172.5.253]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0Lgf13-1TlqWR3q8D-00oS2o; Fri, 28 Sep 2012 23:36:23 +0200 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, arm@kernel.org, Arnd Bergmann , Thomas Abraham , Linus Walleij , Stephen Warren , Kukjin Kim Subject: [PATCH 11/12] pinctrl: samsung: use __devinit section for init code Date: Fri, 28 Sep 2012 23:36:16 +0200 Message-Id: <1348868177-21205-12-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1348868177-21205-1-git-send-email-arnd@arndb.de> References: <1348868177-21205-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:gLpzzgPiaTmBDVmu14LPHDlQ230NvtguEmDPZVwdRzK Ukzv2AweNryXogFexkVF4AyNxEZic03O/xjaZSuk45oGmTGkGj Fv/rRQHVHLGtgA7UCEQc9mVQv/p2qm2eB+L0BY+rsj73x+k1jl bWIr+mItOYaqrCW5JsRENR4G9+Qj3GOgzScTIM6FPkjRCmQ/iR DfeesTrRHV9rAb5ZrTehyhaMy7SfwP+t2NFhVbY3BXa17UbFkb gXBT+23TwXe5cnZNhD7T+GSii3+R+KaLYZC2keZVECn0p3FndF eLhxJ4ndGGlOEsezrDMsWRCRMtPZTXlopyYwlJSf/mVgTF/htJ Fj7pE0DgK65eTdt0kpfsDp/5Jv8yvYm+pcrXxfhxW1OhuIxO2m Q3pz2EuIC0Y0g== X-Gm-Message-State: ALoCoQn/CX82LMRqI9d+kxMf/F9QYLQ83zwb1x94K50GC897HTqi2bgmyY4t4OCliSQlaRJE13tB The samsung pinctrl driver has a probe function that is __devinit and that calls a lot of other functions that are marked __init, which kbuild complains about. Marking everything __devinit means that the code does not discarded when CONFIG_HOTPLUG is set, which is a little more wasteful, but also more consistent Without this patch, building exynos_defconfig results in: WARNING: drivers/pinctrl/built-in.o(.devinit.text+0x124): Section mismatch in reference from the function samsung_pinctrl_probe() to the function .init.text:samsung_gpiolib_register() The function __devinit samsung_pinctrl_probe() references a function __init samsung_gpiolib_register(). If samsung_gpiolib_register is only used by samsung_pinctrl_probe then annotate samsung_gpiolib_register with a matching annotation. Signed-off-by: Arnd Bergmann Cc: Thomas Abraham Cc: Linus Walleij Cc: Stephen Warren Cc: Kukjin Kim --- drivers/pinctrl/pinctrl-samsung.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/pinctrl/pinctrl-samsung.c b/drivers/pinctrl/pinctrl-samsung.c index dd108a9..861cd5f 100644 --- a/drivers/pinctrl/pinctrl-samsung.c +++ b/drivers/pinctrl/pinctrl-samsung.c @@ -513,7 +513,7 @@ static int samsung_gpio_direction_output(struct gpio_chip *gc, unsigned offset, * Parse the pin names listed in the 'samsung,pins' property and convert it * into a list of gpio numbers are create a pin group from it. */ -static int __init samsung_pinctrl_parse_dt_pins(struct platform_device *pdev, +static int __devinit samsung_pinctrl_parse_dt_pins(struct platform_device *pdev, struct device_node *cfg_np, struct pinctrl_desc *pctl, unsigned int **pin_list, unsigned int *npins) { @@ -560,7 +560,7 @@ static int __init samsung_pinctrl_parse_dt_pins(struct platform_device *pdev, * from device node of the pin-controller. A pin group is formed with all * the pins listed in the "samsung,pins" property. */ -static int __init samsung_pinctrl_parse_dt(struct platform_device *pdev, +static int __devinit samsung_pinctrl_parse_dt(struct platform_device *pdev, struct samsung_pinctrl_drv_data *drvdata) { struct device *dev = &pdev->dev; @@ -655,7 +655,7 @@ static int __init samsung_pinctrl_parse_dt(struct platform_device *pdev, } /* register the pinctrl interface with the pinctrl subsystem */ -static int __init samsung_pinctrl_register(struct platform_device *pdev, +static int __devinit samsung_pinctrl_register(struct platform_device *pdev, struct samsung_pinctrl_drv_data *drvdata) { struct pinctrl_desc *ctrldesc = &drvdata->pctl; @@ -729,7 +729,7 @@ static int __init samsung_pinctrl_register(struct platform_device *pdev, } /* register the gpiolib interface with the gpiolib subsystem */ -static int __init samsung_gpiolib_register(struct platform_device *pdev, +static int __devinit samsung_gpiolib_register(struct platform_device *pdev, struct samsung_pinctrl_drv_data *drvdata) { struct gpio_chip *gc; @@ -762,7 +762,7 @@ static int __init samsung_gpiolib_register(struct platform_device *pdev, } /* unregister the gpiolib interface with the gpiolib subsystem */ -static int __init samsung_gpiolib_unregister(struct platform_device *pdev, +static int __devinit samsung_gpiolib_unregister(struct platform_device *pdev, struct samsung_pinctrl_drv_data *drvdata) { int ret = gpiochip_remove(drvdata->gc);