mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	net: phy: qca807x: use new phy_package_shared getters
Use the new getters for members of struct phy_package_shared. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://patch.msgid.link/b6402789-45d2-49d6-835f-ed584bce5b2f@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
		
							parent
							
								
									2c8cd9783f
								
							
						
					
					
						commit
						947030f3c3
					
				
					 1 changed files with 7 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -15,6 +15,7 @@
 | 
			
		|||
#include <linux/gpio/driver.h>
 | 
			
		||||
#include <linux/sfp.h>
 | 
			
		||||
 | 
			
		||||
#include "../phylib.h"
 | 
			
		||||
#include "qcom.h"
 | 
			
		||||
 | 
			
		||||
#define QCA807X_CHIP_CONFIGURATION				0x1f
 | 
			
		||||
| 
						 | 
				
			
			@ -486,13 +487,13 @@ static int qca807x_read_status(struct phy_device *phydev)
 | 
			
		|||
 | 
			
		||||
static int qca807x_phy_package_probe_once(struct phy_device *phydev)
 | 
			
		||||
{
 | 
			
		||||
	struct phy_package_shared *shared = phydev->shared;
 | 
			
		||||
	struct qca807x_shared_priv *priv = shared->priv;
 | 
			
		||||
	struct qca807x_shared_priv *priv = phy_package_get_priv(phydev);
 | 
			
		||||
	struct device_node *np = phy_package_get_node(phydev);
 | 
			
		||||
	unsigned int tx_drive_strength;
 | 
			
		||||
	const char *package_mode_name;
 | 
			
		||||
 | 
			
		||||
	/* Default to 600mw if not defined */
 | 
			
		||||
	if (of_property_read_u32(shared->np, "qcom,tx-drive-strength-milliwatt",
 | 
			
		||||
	if (of_property_read_u32(np, "qcom,tx-drive-strength-milliwatt",
 | 
			
		||||
				 &tx_drive_strength))
 | 
			
		||||
		tx_drive_strength = 600;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -541,7 +542,7 @@ static int qca807x_phy_package_probe_once(struct phy_device *phydev)
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	priv->package_mode = PHY_INTERFACE_MODE_NA;
 | 
			
		||||
	if (!of_property_read_string(shared->np, "qcom,package-mode",
 | 
			
		||||
	if (!of_property_read_string(np, "qcom,package-mode",
 | 
			
		||||
				     &package_mode_name)) {
 | 
			
		||||
		if (!strcasecmp(package_mode_name,
 | 
			
		||||
				phy_modes(PHY_INTERFACE_MODE_PSGMII)))
 | 
			
		||||
| 
						 | 
				
			
			@ -558,8 +559,7 @@ static int qca807x_phy_package_probe_once(struct phy_device *phydev)
 | 
			
		|||
 | 
			
		||||
static int qca807x_phy_package_config_init_once(struct phy_device *phydev)
 | 
			
		||||
{
 | 
			
		||||
	struct phy_package_shared *shared = phydev->shared;
 | 
			
		||||
	struct qca807x_shared_priv *priv = shared->priv;
 | 
			
		||||
	struct qca807x_shared_priv *priv = phy_package_get_priv(phydev);
 | 
			
		||||
	int val, ret;
 | 
			
		||||
 | 
			
		||||
	/* Make sure PHY follow PHY package mode if enforced */
 | 
			
		||||
| 
						 | 
				
			
			@ -708,7 +708,6 @@ static int qca807x_probe(struct phy_device *phydev)
 | 
			
		|||
	struct device_node *node = phydev->mdio.dev.of_node;
 | 
			
		||||
	struct qca807x_shared_priv *shared_priv;
 | 
			
		||||
	struct device *dev = &phydev->mdio.dev;
 | 
			
		||||
	struct phy_package_shared *shared;
 | 
			
		||||
	struct qca807x_priv *priv;
 | 
			
		||||
	int ret;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -722,8 +721,7 @@ static int qca807x_probe(struct phy_device *phydev)
 | 
			
		|||
			return ret;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	shared = phydev->shared;
 | 
			
		||||
	shared_priv = shared->priv;
 | 
			
		||||
	shared_priv = phy_package_get_priv(phydev);
 | 
			
		||||
 | 
			
		||||
	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
 | 
			
		||||
	if (!priv)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue