powerpc: gpio_mdio: Simplify gpio_mdio_probe()
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | powerpc: gpio_mdio: Use devm_mdiobus_alloc_size()arch/ | +5 | 0 replies | |
| 2/2 | powerpc: gpio_mdio: Use devm_of_mdiobus_register()arch/ | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] powerpc: gpio_mdio: Simplify gpio_mdio_probe()
While wondering if it was correct to call mdiobus_free() in the remove function and only kfree() in the error handling of the probe, I arrived at the conclusion that the code could be simpler here.
Patch 1 uses mdiobus_alloc_size() instead of a hand written mdiobus_alloc() + kzalloc(). it also uses the devm_ version in order to save some LoC (and answer my initial question)
Patch 2 uses devm_of_mdiobus_register() to completly remove the .remove() function and save some more LoC.
Both patches are compile tested only.
Christophe JAILLET (2):
powerpc: gpio_mdio: Use devm_mdiobus_alloc_size()
powerpc: gpio_mdio: Use devm_of_mdiobus_register()
arch/powerpc/platforms/pasemi/gpio_mdio.c | 41 ++++------------------- 1 file changed, 6 insertions(+), 35 deletions(-)
Signature · 1 line
2.48.1