From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752596AbbJLNOO (ORCPT ); Mon, 12 Oct 2015 09:14:14 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:52008 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751801AbbJLNOM (ORCPT ); Mon, 12 Oct 2015 09:14:12 -0400 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: [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 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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",