From patchwork Thu Jan 3 01:10:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 10746873 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 013B81399 for ; Thu, 3 Jan 2019 01:13:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E588128409 for ; Thu, 3 Jan 2019 01:12:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA0CA28417; Thu, 3 Jan 2019 01:12:59 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 6EFB028409 for ; Thu, 3 Jan 2019 01:12:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727284AbfACBM5 (ORCPT ); Wed, 2 Jan 2019 20:12:57 -0500 Received: from mail-out.m-online.net ([212.18.0.10]:43928 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726376AbfACBLM (ORCPT ); Wed, 2 Jan 2019 20:11:12 -0500 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 43VVH203YCz1qvTW; Thu, 3 Jan 2019 02:11:10 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 43VVH16zs5z1qvWh; Thu, 3 Jan 2019 02:11:09 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id XwTOkQKQfftW; Thu, 3 Jan 2019 02:11:08 +0100 (CET) X-Auth-Info: bMxLHe63APZwpnzE5s74dXIa44PZ/WN1O+mnBZhxcb4= Received: from kurokawa.lan (ip-86-49-110-70.net.upcbroadband.cz [86.49.110.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Thu, 3 Jan 2019 02:11:08 +0100 (CET) From: Marek Vasut To: netdev@vger.kernel.org Cc: Marek Vasut , "David S . Miller" , Nisar Sayed , Woojung Huh , Andrew Lunn , Florian Fainelli , linux-usb@vger.kernel.org Subject: [PATCH 05/19] usbnet: smsc95xx: Remove smsc95xx_{read,write}_nopm() Date: Thu, 3 Jan 2019 02:10:26 +0100 Message-Id: <20190103011040.25974-6-marex@denx.de> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190103011040.25974-1-marex@denx.de> References: <20190103011040.25974-1-marex@denx.de> MIME-Version: 1.0 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 These functions are now equal to smsc95xx_mdio_{read,write}(), deduplicate them. Signed-off-by: Marek Vasut Cc: David S. Miller Cc: Nisar Sayed Cc: Woojung Huh Cc: Andrew Lunn Cc: Florian Fainelli Cc: linux-usb@vger.kernel.org To: netdev@vger.kernel.org --- drivers/net/usb/smsc95xx.c | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 6c48fec2e5b5..1ab7e6fa6d7a 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -252,18 +252,6 @@ static void __smsc95xx_mdio_write(struct net_device *netdev, int phy_id, mutex_unlock(&dev->phy_mutex); } -static int smsc95xx_mdio_read_nopm(struct net_device *netdev, int phy_id, - int idx) -{ - return __smsc95xx_mdio_read(netdev, phy_id, idx); -} - -static void smsc95xx_mdio_write_nopm(struct net_device *netdev, int phy_id, - int idx, int regval) -{ - __smsc95xx_mdio_write(netdev, phy_id, idx, regval); -} - static int smsc95xx_mdio_read(struct net_device *netdev, int phy_id, int idx) { return __smsc95xx_mdio_read(netdev, phy_id, idx); @@ -1340,18 +1328,18 @@ static int smsc95xx_enable_phy_wakeup_interrupts(struct usbnet *dev, u16 mask) netdev_dbg(dev->net, "enabling PHY wakeup interrupts\n"); /* read to clear */ - ret = smsc95xx_mdio_read_nopm(dev->net, mii->phy_id, PHY_INT_SRC); + ret = smsc95xx_mdio_read(dev->net, mii->phy_id, PHY_INT_SRC); if (ret < 0) return ret; /* enable interrupt source */ - ret = smsc95xx_mdio_read_nopm(dev->net, mii->phy_id, PHY_INT_MASK); + ret = smsc95xx_mdio_read(dev->net, mii->phy_id, PHY_INT_MASK); if (ret < 0) return ret; ret |= mask; - smsc95xx_mdio_write_nopm(dev->net, mii->phy_id, PHY_INT_MASK, ret); + smsc95xx_mdio_write(dev->net, mii->phy_id, PHY_INT_MASK, ret); return 0; } @@ -1362,11 +1350,11 @@ static int smsc95xx_link_ok_nopm(struct usbnet *dev) int ret; /* first, a dummy read, needed to latch some MII phys */ - ret = smsc95xx_mdio_read_nopm(dev->net, mii->phy_id, MII_BMSR); + ret = smsc95xx_mdio_read(dev->net, mii->phy_id, MII_BMSR); if (ret < 0) return ret; - ret = smsc95xx_mdio_read_nopm(dev->net, mii->phy_id, MII_BMSR); + ret = smsc95xx_mdio_read(dev->net, mii->phy_id, MII_BMSR); if (ret < 0) return ret; @@ -1423,17 +1411,17 @@ static int smsc95xx_enter_suspend1(struct usbnet *dev) * compatibility with non-standard link partners */ if (pdata->features & FEATURE_PHY_NLP_CROSSOVER) - smsc95xx_mdio_write_nopm(dev->net, mii->phy_id, PHY_EDPD_CONFIG, - PHY_EDPD_CONFIG_DEFAULT); + smsc95xx_mdio_write(dev->net, mii->phy_id, PHY_EDPD_CONFIG, + PHY_EDPD_CONFIG_DEFAULT); /* enable energy detect power-down mode */ - ret = smsc95xx_mdio_read_nopm(dev->net, mii->phy_id, PHY_MODE_CTRL_STS); + ret = smsc95xx_mdio_read(dev->net, mii->phy_id, PHY_MODE_CTRL_STS); if (ret < 0) return ret; ret |= MODE_CTRL_STS_EDPWRDOWN_; - smsc95xx_mdio_write_nopm(dev->net, mii->phy_id, PHY_MODE_CTRL_STS, ret); + smsc95xx_mdio_write(dev->net, mii->phy_id, PHY_MODE_CTRL_STS, ret); /* enter SUSPEND1 mode */ ret = smsc95xx_read_reg(dev, PM_CTRL, &val);