|
@@ -472,28 +472,27 @@ void __init orion_ge11_init(struct mv643xx_eth_platform_data *eth_data,
|
|
|
/*****************************************************************************
|
|
|
* Ethernet switch
|
|
|
****************************************************************************/
|
|
|
-static __initconst const char *orion_ge00_mvmdio_bus_name = "orion-mii";
|
|
|
-static __initdata struct mdio_board_info
|
|
|
- orion_ge00_switch_board_info;
|
|
|
+static __initdata struct mdio_board_info orion_ge00_switch_board_info = {
|
|
|
+ .bus_id = "orion-mii",
|
|
|
+ .modalias = "mv88e6085",
|
|
|
+};
|
|
|
|
|
|
void __init orion_ge00_switch_init(struct dsa_chip_data *d)
|
|
|
{
|
|
|
- struct mdio_board_info *bd;
|
|
|
unsigned int i;
|
|
|
|
|
|
if (!IS_BUILTIN(CONFIG_PHYLIB))
|
|
|
return;
|
|
|
|
|
|
- for (i = 0; i < ARRAY_SIZE(d->port_names); i++)
|
|
|
- if (!strcmp(d->port_names[i], "cpu"))
|
|
|
+ for (i = 0; i < ARRAY_SIZE(d->port_names); i++) {
|
|
|
+ if (!strcmp(d->port_names[i], "cpu")) {
|
|
|
+ d->netdev[i] = &orion_ge00.dev;
|
|
|
break;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- bd = &orion_ge00_switch_board_info;
|
|
|
- bd->bus_id = orion_ge00_mvmdio_bus_name;
|
|
|
- bd->mdio_addr = d->sw_addr;
|
|
|
- d->netdev[i] = &orion_ge00.dev;
|
|
|
- strcpy(bd->modalias, "mv88e6085");
|
|
|
- bd->platform_data = d;
|
|
|
+ orion_ge00_switch_board_info.mdio_addr = d->sw_addr;
|
|
|
+ orion_ge00_switch_board_info.platform_data = d;
|
|
|
|
|
|
mdiobus_register_board_info(&orion_ge00_switch_board_info, 1);
|
|
|
}
|