> Have mdio_alloc() create the array of interrupt numbers, and
> initialize it to POLLING. This is what most MDIO drivers want, so
> allowing code to be removed from the drivers.
> 
[S.H] Snip.

> diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
> index 88cb4592b6fb..05381d0f559c 100644
> --- a/drivers/net/phy/mdio_bus.c
> +++ b/drivers/net/phy/mdio_bus.c
> @@ -51,6 +51,7 @@ struct mii_bus *mdiobus_alloc_size(size_t size)
>       struct mii_bus *bus;
>       size_t aligned_size = ALIGN(sizeof(*bus), NETDEV_ALIGN);
>       size_t alloc_size;
> +     int i;
> 
>       /* If we alloc extra space, it should be aligned */
>       if (size)
> @@ -65,6 +66,10 @@ struct mii_bus *mdiobus_alloc_size(size_t size)
>                       bus->priv = (void *)bus + aligned_size;
>       }
> 
> +     /* Initialise the interrupts to polling */
> +     for (i = 0; i < PHY_MAX_ADDR; i++)
> +             bus->irq[i] = PHY_POLL;
> +
>       return bus;
>  }
[S.H] Should similar code in of_mdiobus_register() to remove?

Thanks,

Shaohui
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to