Skip to content

Commit f921861

Browse files
lunndavem330
authored andcommitted
net: ethernet: emac: Fix phy mode type
Pass a phy_interface_t to of_get_phy_mode(), by changing the type of phy_mode in the device structure. This then requires that zmii_attach() is also changes, since it takes a pointer to phy_mode. Fixes: 0c65b2b ("net: of_get_phy_mode: Change API to solve int/unit warnings") Reported-by: kbuild test robot <lkp@intel.com> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 5ea4b12 commit f921861

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

drivers/net/ethernet/ibm/emac/core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ struct emac_instance {
171171
struct mal_commac commac;
172172

173173
/* PHY infos */
174-
int phy_mode;
174+
phy_interface_t phy_mode;
175175
u32 phy_map;
176176
u32 phy_address;
177177
u32 phy_feat_exc;

drivers/net/ethernet/ibm/emac/zmii.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ static inline u32 zmii_mode_mask(int mode, int input)
7878
}
7979
}
8080

81-
int zmii_attach(struct platform_device *ofdev, int input, int *mode)
81+
int zmii_attach(struct platform_device *ofdev, int input,
82+
phy_interface_t *mode)
8283
{
8384
struct zmii_instance *dev = platform_get_drvdata(ofdev);
8485
struct zmii_regs __iomem *p = dev->base;

drivers/net/ethernet/ibm/emac/zmii.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ struct zmii_instance {
5050

5151
int zmii_init(void);
5252
void zmii_exit(void);
53-
int zmii_attach(struct platform_device *ofdev, int input, int *mode);
53+
int zmii_attach(struct platform_device *ofdev, int input,
54+
phy_interface_t *mode);
5455
void zmii_detach(struct platform_device *ofdev, int input);
5556
void zmii_get_mdio(struct platform_device *ofdev, int input);
5657
void zmii_put_mdio(struct platform_device *ofdev, int input);

0 commit comments

Comments
 (0)