• Timur Tabi's avatar
    phylib: introduce mdiobus_alloc_size() · eb8a54a7
    Timur Tabi authored
    Introduce function mdiobus_alloc_size() as an alternative to mdiobus_alloc().
    Most callers of mdiobus_alloc() also allocate a private data structure, and
    then manually point bus->priv to this object.  mdiobus_alloc_size()
    combines the two operations into one, which simplifies memory management.
    
    The original mdiobus_alloc() now just calls mdiobus_alloc_size(0).
    Signed-off-by: default avatarTimur Tabi <timur@freescale.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    eb8a54a7
mdio_bus.c 9.24 KB