Skip to content

Commit

Permalink
kernel: b53: fix compilation with kernels 5.5+
Browse files Browse the repository at this point in the history
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
  • Loading branch information
Rafał Miłecki committed Jun 5, 2020
1 parent 5b9ba4a commit 8c31afb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions target/linux/generic/files/drivers/net/phy/b53/b53_common.c
Expand Up @@ -506,7 +506,15 @@ static int b53_configure_ports_of(struct b53_device *dev)
if (fixed_link) {
u32 spd;
u8 po = GMII_PO_LINK;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)
phy_interface_t mode;
#else
int mode = of_get_phy_mode(pn);
#endif

#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)
of_get_phy_mode(pn, &mode);
#endif

if (!of_property_read_u32(fixed_link, "speed", &spd)) {
switch (spd) {
Expand Down

0 comments on commit 8c31afb

Please sign in to comment.