From patchwork Mon Oct 12 13:14:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 7375001 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 44A3ABEEA4 for ; Mon, 12 Oct 2015 13:16:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5ABDC2066F for ; Mon, 12 Oct 2015 13:16:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3E13C20672 for ; Mon, 12 Oct 2015 13:16:22 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zlcw1-0000Ox-KK; Mon, 12 Oct 2015 13:14:37 +0000 Received: from mout.kundenserver.de ([212.227.126.187]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zlcvz-0000LK-FX for linux-arm-kernel@lists.infradead.org; Mon, 12 Oct 2015 13:14:35 +0000 Received: from wuerfel.localnet ([149.172.15.242]) by mrelayeu.kundenserver.de (mreue003) with ESMTPSA (Nemesis) id 0Md04s-1a2k6W2dNa-00I9S5; Mon, 12 Oct 2015 15:14:06 +0200 From: Arnd Bergmann To: Alexandre Belloni Subject: [PATCH] rtc: davinci: remove incorrect reference to probe function Date: Mon, 12 Oct 2015 15:14:05 +0200 Message-ID: <5677325.oZsHpDNL2Z@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 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Michelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151012_061435_725873_02030751 X-CRM114-Status: GOOD ( 15.11 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alessandro Zummo , rtc-linux@googlegroups.com, Kevin Hilman , Sekhar Nori , linux-kernel@vger.kernel.org, Miguel Aguilar , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The davinci rtc driver uses the module_platform_driver_probe() helper to call the probe function and mark it as __init, but it also puts a reference into its davinci_rtc_driver function. This will crash if we ever get a deferred probe and the probe function is called again after the init section has been removed. kbuild warns about this: WARNING: vmlinux.o(.data+0x1aa2b4): Section mismatch in reference from the variable davinci_rtc_driver to the function .init.text:davinci_rtc_probe() The variable davinci_rtc_driver references the function __init davinci_rtc_probe() This patch removes the .probe callback from the platform driver, which avoids those problems. Signed-off-by: Arnd Bergmann diff --git a/drivers/rtc/rtc-davinci.c b/drivers/rtc/rtc-davinci.c index c84f46168a52..c5432bf64e1c 100644 --- a/drivers/rtc/rtc-davinci.c +++ b/drivers/rtc/rtc-davinci.c @@ -546,7 +546,6 @@ static int __exit davinci_rtc_remove(struct platform_device *pdev) } static struct platform_driver davinci_rtc_driver = { - .probe = davinci_rtc_probe, .remove = __exit_p(davinci_rtc_remove), .driver = { .name = "rtc_davinci",