From patchwork Mon May 21 13:42:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Liu X-Patchwork-Id: 10415369 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 174FE60365 for ; Mon, 21 May 2018 13:42:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08E7F28900 for ; Mon, 21 May 2018 13:42:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F1E6328906; Mon, 21 May 2018 13:42:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9DAB128900 for ; Mon, 21 May 2018 13:42:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752698AbeEUNm2 (ORCPT ); Mon, 21 May 2018 09:42:28 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:9220 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751559AbeEUNmX (ORCPT ); Mon, 21 May 2018 09:42:23 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id w4LDgMCC025671; Mon, 21 May 2018 08:42:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1526910142; bh=fo2DvPaaycRhLOE8tq6PEjm9iVizSf8FPfCLwP41fRM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Z2ROgDo7M9Vp765QC2QO2Llk9XdL1o3okPlZlq73eItWbRGQhnm20JRIYymaD/+1u Q8/Tuk4K5p7t2VzuDiHfXOfdOXFoOny9cnP2MoQsZY/18jYLaFDhm1d8xVwuyr0xJU 8Y0BPy5E/1KdP4q2QqAhCJo07+3AyKf6xBqPDzXA= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4LDgMDD006549; Mon, 21 May 2018 08:42:22 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Mon, 21 May 2018 08:42:22 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Mon, 21 May 2018 08:42:22 -0500 Received: from uda0271908.am.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4LDgMXe032590; Mon, 21 May 2018 08:42:22 -0500 From: Bin Liu To: Greg Kroah-Hartman CC: , Bin Liu Subject: [PATCH 06/14] usb: musb: dsps: remove duplicated get_musb_port_mode() Date: Mon, 21 May 2018 08:42:14 -0500 Message-ID: <1526910142-15862-7-git-send-email-b-liu@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1526910142-15862-1-git-send-email-b-liu@ti.com> References: <1526910142-15862-1-git-send-email-b-liu@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP musb_core already has musb_get_mode(), so remove the duplicate from musb_dsps.c. Signed-off-by: Bin Liu --- drivers/usb/musb/musb_dsps.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 6a60bc0490c5..c513ecebc35a 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -729,25 +729,6 @@ static int get_int_prop(struct device_node *dn, const char *s) return val; } -static int get_musb_port_mode(struct device *dev) -{ - enum usb_dr_mode mode; - - mode = usb_get_dr_mode(dev); - switch (mode) { - case USB_DR_MODE_HOST: - return MUSB_PORT_MODE_HOST; - - case USB_DR_MODE_PERIPHERAL: - return MUSB_PORT_MODE_GADGET; - - case USB_DR_MODE_UNKNOWN: - case USB_DR_MODE_OTG: - default: - return MUSB_PORT_MODE_DUAL_ROLE; - } -} - static int dsps_create_musb_pdev(struct dsps_glue *glue, struct platform_device *parent) { @@ -807,7 +788,7 @@ static int dsps_create_musb_pdev(struct dsps_glue *glue, config->num_eps = get_int_prop(dn, "mentor,num-eps"); config->ram_bits = get_int_prop(dn, "mentor,ram-bits"); config->host_port_deassert_reset_at_resume = 1; - pdata.mode = get_musb_port_mode(dev); + pdata.mode = musb_get_mode(dev); /* DT keeps this entry in mA, musb expects it as per USB spec */ pdata.power = get_int_prop(dn, "mentor,power") / 2;