Skip to content

Commit

Permalink
net: ethernet: emac: Fix phy mode type
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Lunn authored and David S. Miller committed Nov 6, 2019
1 parent 5ea4b12 commit f921861
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/ibm/emac/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ struct emac_instance {
struct mal_commac commac;

/* PHY infos */
int phy_mode;
phy_interface_t phy_mode;
u32 phy_map;
u32 phy_address;
u32 phy_feat_exc;
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/ethernet/ibm/emac/zmii.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ static inline u32 zmii_mode_mask(int mode, int input)
}
}

int zmii_attach(struct platform_device *ofdev, int input, int *mode)
int zmii_attach(struct platform_device *ofdev, int input,
phy_interface_t *mode)
{
struct zmii_instance *dev = platform_get_drvdata(ofdev);
struct zmii_regs __iomem *p = dev->base;
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/ethernet/ibm/emac/zmii.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ struct zmii_instance {

int zmii_init(void);
void zmii_exit(void);
int zmii_attach(struct platform_device *ofdev, int input, int *mode);
int zmii_attach(struct platform_device *ofdev, int input,
phy_interface_t *mode);
void zmii_detach(struct platform_device *ofdev, int input);
void zmii_get_mdio(struct platform_device *ofdev, int input);
void zmii_put_mdio(struct platform_device *ofdev, int input);
Expand Down

0 comments on commit f921861

Please sign in to comment.