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: 529100 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-wi0-x238.google.com (mail-wi0-x238.google.com [IPv6:2a00:1450:400c:c05::238]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3A7961401F0 for ; Tue, 13 Oct 2015 00:14:14 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b=XQqbPuga; dkim-atps=neutral Received: by wibgw2 with SMTP id gw2sf23222654wib.0 for ; Mon, 12 Oct 2015 06:14:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=from:to:cc:subject:date:message-id:user-agent:mime-version :content-type:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group :list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe; bh=xMA5ez83duxAUV+LEmBGuw9gK3BZFcUkrGSQZFqQwao=; b=XQqbPuga8UOEr2Dk9X/EZCP4aQj283YRcVA0VcJik+9rcScrSb2EQ9im9a1nOI6LDI pxlbzPZdGdNwqURtsb4UNVUkowJPDGaqqHv35pi479L8ZsK8bXTLZCnGtU/caNyPMQ9V Ftehqu7L46leTP+9jaLjaa4KSP37UBQ/kG8vU3HBLfjkbItlCp6p20p/lCGBs+FMWEnJ vk1MowlHCgnLxbroyGz0cvu31lUGJbSTMmvf4O2QIrL6jt4zVB8ppHAdaWRPptPT1uGp DjcPf0L29fRY7y9YmgVE2JI6t8XXsLrtZ/RXOoanvAFAPVNT0q/0ZZtY4+eF0Md8qeLe uHWA== X-Received: by 10.25.161.131 with SMTP id k125mr52469lfe.34.1444655652047; Mon, 12 Oct 2015 06:14:12 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.25.161.20 with SMTP id k20ls489341lfe.88.gmail; Mon, 12 Oct 2015 06:14:11 -0700 (PDT) X-Received: by 10.112.140.202 with SMTP id ri10mr4944264lbb.10.1444655651405; Mon, 12 Oct 2015 06:14:11 -0700 (PDT) Received: from mout.kundenserver.de (mout.kundenserver.de. [212.227.126.187]) by gmr-mx.google.com with ESMTPS id q6si478937wif.2.2015.10.12.06.14.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Oct 2015 06:14:11 -0700 (PDT) Received-SPF: neutral (google.com: 212.227.126.187 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.126.187; 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 Cc: Alessandro Zummo , rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sekhar Nori , Kevin Hilman , Miguel Aguilar Subject: [rtc-linux] [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: 1.0 X-Provags-ID: V03:K0:0bnsONDSGywbhAxc/Y2P05GDj0rvsASC/2fDlNOE5x2FeY3L8t2 xLIuOnqmifL30kRAq4Yp3L2zWo59ifJP5o+S14/PbwMgxIP26Ek1wdC66zbR9JrhSP7c6Vn hdMVz4i01+xYqdmsovgQARfNlxCjj0WWGsBSrVLy096yn2zgsiESCSnUCMJWjeUp2tFKFb/ oU6XLIifWKi5cqlLM7wrw== X-UI-Out-Filterresults: notjunk:1; V01:K0:uRLSzpCi0D0=:NFxD+wuF7pJ6gB/AUe7L7N Z5HWt//JtRt/1TNrX/gUo76/z4avheKWFrcGphqyBjpWKLkosh8g9l+N7Ov0o5fycUjRlAY41 wMnqFTqim8Xn7D+S8xt0x2tRUk5TVLpztLWbQ+cMvxYqundB0cg38aTS+go86v3O+D/qTBIZa q3Z9gtLXjyg4zBtCm+K7zmqPKWTNNyif0bKgv0OnTHJPtroLkZEM3/jYrStahrHP6Dn3kbK+J sw+SO3CS0oU4uLD4Dc/jzsCm+8HO3BFbfe1sPR+ntgHuUKIItJ9GnooWmMGr3Mg0LN5meU2PX kzLDdYJR6UiFK3qroO6EAQXurdnWgG34cgE1WeO6YA60EyeiRNbz8d8QUIgh/82tMk3A2SuNx mQGmLfkZ7kdH6HUwQZvOeZPBxgIs3hEnDAEr2GVF2Dk4Nn2rjRdzAM3jNKZ8FXDCmqsB3Ug3h gkDhSA47Rpx6vVujlW9OQSibd43j4+Ikhw9eaqXh+I0WCMmP+9X90xP5n8fsh2NdVGZxhaEL8 gj12WIpH28cori7uM4Kf+YCcZCNy3LOAOGL1zFf4sPkJBRLrmqsJAdgkId2uW9/HOxM1wJOoi 5BkyazGsddRMB9tqbhLtrv4da6pL6uLmAdXfd6WrJZclPFCc9kFuk18RqlfVDiM2E3cRZ4hAX MIp0rlaGTCHOPUu6XqkxlnhjdO9RE75lIc6mXutOKhphIgfPKfPK8uQ7jLHiNZCeBmiREdsMx JmwLesRkXZJXsimN X-Original-Sender: arnd@arndb.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.227.126.187 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) smtp.mailfrom=arnd@arndb.de Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: rtc-linux@googlegroups.com X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , 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",