]> git.baikalelectronics.ru Git - kernel.git/commit
phylib: introduce mdiobus_alloc_size()
authorTimur Tabi <timur@freescale.com>
Thu, 12 Jan 2012 23:23:04 +0000 (15:23 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Jan 2012 23:23:04 +0000 (15:23 -0800)
commitcea7ca72923ca4bdaac093247291573c4aa9f6b2
treed3642783d7470c26815b7d3c14ea5d5949d7dcdb
parent82d534ff6a3009e4311d4eb7b9ba6bc32854253f
phylib: introduce mdiobus_alloc_size()

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: Timur Tabi <timur@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mdio_bus.c
include/linux/phy.h