Merge "[qca-ssdk]: Use global rfs device variable for register/unregister"
diff --git a/src/hsl/dess/dess_port_ctrl.c b/src/hsl/dess/dess_port_ctrl.c
index 618302d..398dd40 100755
--- a/src/hsl/dess/dess_port_ctrl.c
+++ b/src/hsl/dess/dess_port_ctrl.c
@@ -1472,6 +1472,7 @@
     hsl_phy_ops_t *phy_drv;
 
     HSL_DEV_ID_CHECK(dev_id);
+    SW_RTN_ON_NULL (phy_drv = hsl_phy_api_ops_get (dev_id));
     if (NULL == phy_drv->phy_link_status_get)
     return SW_NOT_SUPPORTED;
 
diff --git a/src/ref/ref_misc.c b/src/ref/ref_misc.c
index 18a89db..c2b160a 100755
--- a/src/ref/ref_misc.c
+++ b/src/ref/ref_misc.c
@@ -51,8 +51,12 @@
 qca_ar8327_phy_disable();
 extern void
 qca_ar8327_phy_enable(struct qca_phy_priv *priv);
+#ifndef BOARD_AR71XX
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0))
 extern void
 qca_ar8327_port_init(struct qca_phy_priv *priv, a_uint32_t port);
+#endif
+#endif
 
 int
 qca_ar8327_sw_set_max_frame_size(struct switch_dev *dev,
@@ -127,9 +131,11 @@
     rv += qca_ar8327_sw_hw_apply(dev);
     priv->init = false;
 	#ifndef BOARD_AR71XX
+	#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0))
 	for (i = 0; i < AR8327_NUM_PORTS; i++) {
 		qca_ar8327_port_init(priv, i);
-    }
+	}
+	#endif
 	fal_port_link_forcemode_set(0, 5, A_FALSE);
 	qca_ar8327_phy_enable(priv);
 	#endif