mdio_bus: implement devm_mdiobus_alloc/devm_mdiobus_free
authorGrygorii Strashko <grygorii.strashko@ti.com>
Wed, 30 Apr 2014 12:23:33 +0000 (15:23 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 May 2014 20:16:26 +0000 (16:16 -0400)
commit6d48f44b7b2af67b33c1ae5994b8f642685c8bc8
tree3c39a984abea3ca8016660b111783874d982f5b4
parentca8b6e04bc38891cbc0f2c7855bc7d0498dfff9b
mdio_bus: implement devm_mdiobus_alloc/devm_mdiobus_free

Add a resource managed devm_mdiobus_alloc[_size]()/devm_mdiobus_free()
to automatically clean up MDIO bus alocations made by MDIO drivers,
thus leading to simplified MDIO drivers code.

Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-and-tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/driver-model/devres.txt
drivers/net/phy/mdio_bus.c
include/linux/phy.h