Amlogic wol support adds g_phydev global variable and it can be
accessed before setting. Fix not to access null g_phydev and
instead, setting the variable with phydev.
Change-Id: I3b6860431c9d0872b1d421d124522fef51cb4f65
Fixes:
254065327d58 ("phy/realtek: fixup suspend failed issue")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
} else {
int value;
+ if (!g_phydev)
+ g_phydev = phydev;
+
/*pin 31 pull high*/
phy_write(g_phydev, RTL8211F_PAGE_SELECT, 0xd40);
value = phy_read(g_phydev, 0x16);