From patchwork Wed Jul 22 14:58:39 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 36846 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6MF3MDn010638 for ; Wed, 22 Jul 2009 15:03:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751753AbZGVPCl (ORCPT ); Wed, 22 Jul 2009 11:02:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751092AbZGVPCl (ORCPT ); Wed, 22 Jul 2009 11:02:41 -0400 Received: from mail-bw0-f228.google.com ([209.85.218.228]:48530 "EHLO mail-bw0-f228.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750780AbZGVPCk (ORCPT ); Wed, 22 Jul 2009 11:02:40 -0400 Received: by bwz28 with SMTP id 28so243223bwz.37 for ; Wed, 22 Jul 2009 08:02:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :subject; bh=ZehwcZ/ee0rT3vhHjrVM7AFveTkLO+UcNUnyeqxIIhU=; b=EZjktL8YiPSTff716CJNQxOSPKZiqlvKioiAQtr2OPBbGJ5OXJFB1Vv8MakBlR6N8B IV984LVDf6UDmBNayG1M1iskGYa1e3L+pq5HX1X6FXk8teUmB4WBaY3qiqNjjRM71lDg UaTSfjKRjy40KG2Y7ZlDpsqwjE7W0j3FnzB6Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=jFs21yco3jhpQslM+aNLeXCrP1dEGpLT9XH6RSPKcmILF5FW92GQWWHD45c7aLeuj0 SMUSfghpnslmi9hyvRyd1UpxxkzKkC6aPDusXlGvz1eP+83nRVMuCCHu80Rz1LQsSZwf LlP9K925HhxhsJTc810rMlQS42lm3lY1OxWsk= Received: by 10.103.172.9 with SMTP id z9mr530588muo.58.1248274959186; Wed, 22 Jul 2009 08:02:39 -0700 (PDT) Received: from rx1.opensource.se (210.5.32.202.bf.2iij.net [202.32.5.210]) by mx.google.com with ESMTPS id 14sm2340115muo.33.2009.07.22.08.02.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 22 Jul 2009 08:02:38 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: khali@linux-fr.org, Magnus Damm , lethal@linux-sh.org, linux-i2c@vger.kernel.org, ben-linux@fluff.org Date: Wed, 22 Jul 2009 23:58:39 +0900 Message-Id: <20090722145839.17871.94267.sendpatchset@rx1.opensource.se> Subject: [PATCH] i2c: change i2c-sh_mobile.c module_init() to subsys_initcall() Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Magnus Damm Convert the i2c-sh_mobile i2c bus driver to use subsys_initcall() instead of module_init(). This change makes the driver register a bit earlier which together with earlier platform data moves the time for probe(). The earlier probe() makes it possible to use i2c_get_adapter() and i2c_transfer() from device_initcall(). The same strategy is used by other i2c bus drivers such as i2c-pxa.c and i2c-s3c2410.c. Signed-off-by: Magnus Damm --- Paul, can you merge this in your tree? drivers/i2c/busses/i2c-sh_mobile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0001/drivers/i2c/busses/i2c-sh_mobile.c +++ work/drivers/i2c/busses/i2c-sh_mobile.c 2009-07-22 21:54:29.000000000 +0900 @@ -637,7 +637,7 @@ static void __exit sh_mobile_i2c_adap_ex platform_driver_unregister(&sh_mobile_i2c_driver); } -module_init(sh_mobile_i2c_adap_init); +subsys_initcall(sh_mobile_i2c_adap_init); module_exit(sh_mobile_i2c_adap_exit); MODULE_DESCRIPTION("SuperH Mobile I2C Bus Controller driver");