From patchwork Mon Dec 7 17:37:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King X-Patchwork-Id: 553481 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 05C36140313 for ; Tue, 8 Dec 2015 04:38:07 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=arm.linux.org.uk header.i=@arm.linux.org.uk header.b=MjcfQ94p; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932494AbbLGRiC (ORCPT ); Mon, 7 Dec 2015 12:38:02 -0500 Received: from pandora.arm.linux.org.uk ([78.32.30.218]:60276 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932438AbbLGRiA (ORCPT ); Mon, 7 Dec 2015 12:38:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=pandora-2014; h=Date:Sender:Message-Id:Content-Type:Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References:In-Reply-To; bh=u0Mf15jyiA3/YWTSpo+Jfrf5Fp1viSKQ5U432zCwF0M=; b=MjcfQ94poKxzeP6JPUZiiQTL1RC9zScCAyFylvuin3YP9GBGxCbxTD4AWf1YnDUD/+FqQYyXOpysF1OjJ5crpRi7bGp0+l53gBl05zuC/o2fBm5ax8etTV4iWGpsfbY6IpveCgFWKPbc9KknqBsu5WJD6NCHc33zYrD5UDbc/ZQ=; Received: from e0022681537dd.dyn.arm.linux.org.uk ([2001:4d48:ad52:3201:222:68ff:fe15:37dd]:47664 helo=rmk-PC.arm.linux.org.uk) by pandora.arm.linux.org.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1a5zja-0003am-CS; Mon, 07 Dec 2015 17:37:58 +0000 Received: from rmk by rmk-PC.arm.linux.org.uk with local (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1a5zjZ-00075I-Hc; Mon, 07 Dec 2015 17:37:57 +0000 In-Reply-To: <20151207173553.GU8644@n2100.arm.linux.org.uk> References: <20151207173553.GU8644@n2100.arm.linux.org.uk> From: Russell King To: Florian Fainelli , Thomas Petazzoni Cc: netdev@vger.kernel.org Subject: [PATCH RFC 09/26] phy: export phy_speed_to_str() for phylink MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Mon, 07 Dec 2015 17:37:57 +0000 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org phylink would like to reuse phy_speed_to_str() to convert the speed to a string. Add a prototype and export this helper function. Signed-off-by: Russell King Reviewed-by: Florian Fainelli --- drivers/net/phy/phy.c | 3 ++- include/linux/phy.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index ec9953202f58..c1be21a84f1d 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -38,7 +38,7 @@ #include -static const char *phy_speed_to_str(int speed) +const char *phy_speed_to_str(int speed) { switch (speed) { case SPEED_10: @@ -57,6 +57,7 @@ static const char *phy_speed_to_str(int speed) return "Unsupported (update phy.c)"; } } +EXPORT_SYMBOL_GPL(phy_speed_to_str); #define PHY_STATE_STR(_state) \ case PHY_##_state: \ diff --git a/include/linux/phy.h b/include/linux/phy.h index 63e52af00493..6b1ec2b99051 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -799,6 +799,7 @@ int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd); int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd); int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd); int phy_start_interrupts(struct phy_device *phydev); +const char *phy_speed_to_str(int speed); void phy_print_status(struct phy_device *phydev); void phy_device_free(struct phy_device *phydev); int phy_set_max_speed(struct phy_device *phydev, u32 max_speed);