Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932576AbbELMN1 (ORCPT ); Tue, 12 May 2015 08:13:27 -0400 Received: from mail-bn1on0119.outbound.protection.outlook.com ([157.56.110.119]:10938 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932449AbbELMNF (ORCPT ); Tue, 12 May 2015 08:13:05 -0400 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; From: Ramneek Mehresh To: CC: , , , Ramneek Mehresh Subject: [PATCH 2/2] drivers:usb:fsl: Use overrides structure for fsl hc driver Date: Tue, 12 May 2015 17:53:52 +0530 Message-ID: <1431433432-17409-3-git-send-email-ramneek.mehresh@freescale.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1431433432-17409-1-git-send-email-ramneek.mehresh@freescale.com> References: <1431433432-17409-1-git-send-email-ramneek.mehresh@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD028;1:G8aQ/8SheXvKG0xBhAD44tx5xufZPanqyn0yuF7p1YxVr6UkyYALEZq5GEHsNveHqdPnIPa0xLgO0ZCq3C+6kCDL5cZmcsWX2z+3YPxUoCS10Xiig9fBLqbopd7sxbU9rvDK+D3enRfuDLktdVKxfwEg1duK+NUUcRtJfo5cT/WV7TyNHNczGCkh6zmxcru0MRKqG+Z8lo63iiLi2HnIjC6mSje/nASiDu3zy9L6YlDOCfvJZvgIHgI8eWqEs26zf9eaTGZlKqx6B4wiGE/U1EDJ899lebZjwlKfNB6Xq8dHADb1k4PSrF2JEdWIUcxza6sBRwjsZf3jCT4HMS8uww== X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(339900001)(199003)(189002)(107886002)(229853001)(77156002)(104016003)(2351001)(62966003)(87936001)(85426001)(76506005)(92566002)(189998001)(5001960100002)(46102003)(105606002)(33646002)(48376002)(76176999)(86362001)(50466002)(50986999)(5001920100001)(110136002)(2950100001)(19580395003)(36756003)(77096005)(106466001)(50226001)(19580405001)(6806004)(47776003)(4001430100001);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR0301MB1578;H:az84smr01.freescale.net;FPR:;SPF:Fail;MLV:sfv;A:1;MX:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB1578; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:CY1PR0301MB1578;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB1578; X-Forefront-PRVS: 0574D4712B X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2015 12:13:02.4225 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.158.2];Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB1578 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2757 Lines: 95 Use overrides structure for fsl ehci host controller driver Signed-off-by: Ramneek Mehresh --- drivers/usb/host/ehci-fsl.c | 54 +++++++++------------------------------------ 1 file changed, 10 insertions(+), 44 deletions(-) diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index 42628e5..81c8df0 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -42,6 +42,8 @@ #define DRIVER_DESC "Fsl EHCI driver" #define DRV_NAME "ehci-fsl" +static struct hc_driver __read_mostly fsl_ehci_hc_driver; + /* configure so an HC device and id are always provided */ /* always called with process context; sleeping is OK */ @@ -613,51 +615,9 @@ static int ehci_start_port_reset(struct usb_hcd *hcd, unsigned port) #define ehci_start_port_reset NULL #endif /* CONFIG_USB_OTG */ - -static const struct hc_driver fsl_ehci_hc_driver = { - .description = hcd_name, - .product_desc = "Freescale On-Chip EHCI Host Controller", - .hcd_priv_size = sizeof(struct ehci_fsl), - - /* - * generic hardware linkage - */ - .irq = ehci_irq, - .flags = HCD_USB2 | HCD_MEMORY | HCD_BH, - - /* - * basic lifecycle operations - */ +static struct ehci_driver_overrides ehci_fsl_overrides __initdata = { + .extra_priv_size = sizeof(struct ehci_fsl), .reset = ehci_fsl_setup, - .start = ehci_run, - .stop = ehci_stop, - .shutdown = ehci_shutdown, - - /* - * managing i/o requests and associated device resources - */ - .urb_enqueue = ehci_urb_enqueue, - .urb_dequeue = ehci_urb_dequeue, - .endpoint_disable = ehci_endpoint_disable, - .endpoint_reset = ehci_endpoint_reset, - - /* - * scheduling support - */ - .get_frame_number = ehci_get_frame, - - /* - * root hub support - */ - .hub_status_data = ehci_hub_status_data, - .hub_control = ehci_hub_control, - .bus_suspend = ehci_bus_suspend, - .bus_resume = ehci_bus_resume, - .start_port_reset = ehci_start_port_reset, - .relinquish_port = ehci_relinquish_port, - .port_handed_over = ehci_port_handed_over, - - .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete, }; /* @@ -709,6 +669,12 @@ static int __init ehci_fsl_init(void) pr_info(DRV_NAME ": " DRIVER_DESC "\n"); + ehci_init_driver(&fsl_ehci_hc_driver, &ehci_fsl_overrides); + + fsl_ehci_hc_driver.product_desc = + "Freescale On-Chip EHCI Host Controller"; + fsl_ehci_hc_driver.start_port_reset = ehci_start_port_reset; + return platform_driver_register(&ehci_fsl_driver); } module_init(ehci_fsl_init); -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/