From patchwork Sat Apr 25 22:53:44 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grant Likely X-Patchwork-Id: 26452 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 24E78B7069 for ; Sun, 26 Apr 2009 08:54:50 +1000 (EST) Received: by ozlabs.org (Postfix) id 9D0044F5CB; Sun, 26 Apr 2009 08:54:06 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 364A34F5BB for ; Sun, 26 Apr 2009 08:54:06 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754573AbZDYWxv (ORCPT ); Sat, 25 Apr 2009 18:53:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754571AbZDYWxs (ORCPT ); Sat, 25 Apr 2009 18:53:48 -0400 Received: from rv-out-0506.google.com ([209.85.198.225]:62952 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754417AbZDYWxq (ORCPT ); Sat, 25 Apr 2009 18:53:46 -0400 Received: by rv-out-0506.google.com with SMTP id f9so1420774rvb.1 for ; Sat, 25 Apr 2009 15:53:46 -0700 (PDT) Received: by 10.140.140.3 with SMTP id n3mr1129860rvd.111.1240700026690; Sat, 25 Apr 2009 15:53:46 -0700 (PDT) Received: from trillian.cg.shawcable.net (S01060016b61d1226.cg.shawcable.net [68.146.92.145]) by mx.google.com with ESMTPS id f21sm3858847rvb.55.2009.04.25.15.53.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 25 Apr 2009 15:53:45 -0700 (PDT) Received: from localhost.localdomain (trillian [127.0.0.1]) by trillian.cg.shawcable.net (Postfix) with ESMTP id 7DA6CC8560; Sat, 25 Apr 2009 16:53:44 -0600 (MDT) From: Grant Likely Subject: [PATCH v3 13/13] net: fix fsl_pq_mdio driver to use module_init() To: linuxppc-dev@ozlabs.org, netdev@vger.kernel.org, Andy Fleming , David Miller , Benjamin Herrenschmidt Cc: Grant Likely Date: Sat, 25 Apr 2009 16:53:44 -0600 Message-ID: <20090425225344.32392.18956.stgit@localhost.localdomain> In-Reply-To: <20090425224458.32392.31296.stgit@localhost.localdomain> References: <20090425224458.32392.31296.stgit@localhost.localdomain> User-Agent: StGIT/0.14.2 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Grant Likely Modules are not supposed to use any of the *_initcall*() hooks as the entry point. fsl_pq_mdio.c was using subsys_initcall_sync() instead of module_init() to guarantee that the MDIO bus was initialized before the Ethernet driver goes looking for the phy. However, the recent OF helpers rework happens to also make sure PHY connection is deferred to .open time, so using an initcall is no longer necessary. This patch replaces the initcall with a more traditional an accepted module_init() call. Tested on Freescale MPC8349emitxgp eval board. Signed-off-by: Grant Likely --- drivers/net/fsl_pq_mdio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/fsl_pq_mdio.c b/drivers/net/fsl_pq_mdio.c index b01daa1..d12e0e0 100644 --- a/drivers/net/fsl_pq_mdio.c +++ b/drivers/net/fsl_pq_mdio.c @@ -415,10 +415,10 @@ int __init fsl_pq_mdio_init(void) { return of_register_platform_driver(&fsl_pq_mdio_driver); } +module_init(fsl_pq_mdio_init); void fsl_pq_mdio_exit(void) { of_unregister_platform_driver(&fsl_pq_mdio_driver); } -subsys_initcall_sync(fsl_pq_mdio_init); module_exit(fsl_pq_mdio_exit);