From patchwork Fri Oct 1 07:47:18 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 222982 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o917lOW3010514 for ; Fri, 1 Oct 2010 07:47:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754690Ab0JAHr3 (ORCPT ); Fri, 1 Oct 2010 03:47:29 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:50238 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754211Ab0JAHr2 (ORCPT ); Fri, 1 Oct 2010 03:47:28 -0400 Received: from dlep35.itg.ti.com ([157.170.170.118]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id o917lRkP001046 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 1 Oct 2010 02:47:27 -0500 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep35.itg.ti.com (8.13.7/8.13.7) with ESMTP id o917lQHH029865; Fri, 1 Oct 2010 02:47:26 -0500 (CDT) Received: from localhost (h0-156.vpn.ti.com [172.24.0.156]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id o917lPf02182; Fri, 1 Oct 2010 02:47:25 -0500 (CDT) From: Felipe Balbi To: Tony Lindgren Cc: Linux OMAP Mailing List , Felipe Balbi Subject: [PATCH 4/4] cbus: tahvo-usb: move platform_device to board file Date: Fri, 1 Oct 2010 10:47:18 +0300 Message-Id: <1285919238-26555-5-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.7.3.rc0.35.g8ac8c In-Reply-To: <1285919238-26555-1-git-send-email-balbi@ti.com> References: <1285919238-26555-1-git-send-email-balbi@ti.com> Organization: Texas Instruments\n Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 01 Oct 2010 07:47:29 +0000 (UTC) diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index f5ac666..a3b7b63 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c @@ -236,6 +236,11 @@ static struct platform_device tahvo_device = { .num_resources = ARRAY_SIZE(tahvo_resource), }; +static struct platform_device tahvo_usb_device = { + .name = "tahvo-usb", + .id = -1, +}; + static struct resource retu_resource[] = { { .start = -EINVAL, /* set later */ @@ -284,6 +289,7 @@ static void __init n8x0_cbus_init(void) tahvo_resource[0].start = gpio_to_irq(tahvo_irq_pin); platform_device_register(&tahvo_device); + platform_device_register(&tahvo_usb_device); if (machine_is_nokia770()) { retu_irq_pin = 62; diff --git a/drivers/cbus/tahvo-usb.c b/drivers/cbus/tahvo-usb.c index 1cb81fd..3e3b85f 100644 --- a/drivers/cbus/tahvo-usb.c +++ b/drivers/cbus/tahvo-usb.c @@ -742,27 +742,15 @@ static struct platform_driver tahvo_usb_driver = { .remove = __exit_p(tahvo_usb_remove), }; -static struct platform_device tahvo_usb_device = { - .name = "tahvo-usb", - .id = -1, -}; - static int __init tahvo_usb_init(void) { int ret = 0; - printk(KERN_INFO "Tahvo USB transceiver driver initializing\n"); ret = platform_driver_probe(&tahvo_usb_driver, tahvo_usb_probe); if (ret) return ret; - ret = platform_device_register(&tahvo_usb_device); - if (ret < 0) { - platform_driver_unregister(&tahvo_usb_driver); - return ret; - } ret = platform_driver_probe(&omap_otg_driver, omap_otg_probe); if (ret) { - platform_device_unregister(&tahvo_usb_device); platform_driver_unregister(&tahvo_usb_driver); return ret; } @@ -774,7 +762,6 @@ subsys_initcall(tahvo_usb_init); static void __exit tahvo_usb_exit(void) { platform_driver_unregister(&omap_otg_driver); - platform_device_unregister(&tahvo_usb_device); platform_driver_unregister(&tahvo_usb_driver); } module_exit(tahvo_usb_exit);