#include <linux/compat.h>
/* DT node properties for MAC-PHY interface */
-#define PHY_MODE_STR_CNT 2
-static const char * const phy_mode_str[PHY_MODE_STR_CNT] = {
+static const char * const phy_mode_str[] = {
"phy-mode", "phy-connection-type"
};
+
/* DT node properties that reference a PHY node */
-#define PHY_HANDLE_STR_CNT 3
-static const char * const phy_handle_str[PHY_HANDLE_STR_CNT] = {
+static const char * const phy_handle_str[] = {
"phy-handle", "phy", "phy-device"
};
goto out;
}
- for (i = 0; i < PHY_HANDLE_STR_CNT; i++)
+ for (i = 0; i < ARRAY_SIZE(phy_handle_str); i++)
if (!dev_read_phandle_with_args(ethdev, phy_handle_str[i], NULL,
0, 0, &phandle))
break;
}
interface = PHY_INTERFACE_MODE_NONE;
- for (i = 0; i < PHY_MODE_STR_CNT; i++) {
+ for (i = 0; i < ARRAY_SIZE(phy_mode_str); i++) {
if_str = dev_read_string(ethdev, phy_mode_str[i]);
if (if_str) {
interface = phy_get_interface_by_name(if_str);