Re: [PATCH 2/2] net: davinci_mdio: use devm_* api

From: Sergei Shtylyov
Date: Fri Apr 04 2014 - 09:18:56 EST


On 04-04-2014 17:40, Grygorii Strashko wrote:

Use devm_* API for memory allocation and to get device's clock
to simplify driver's code.

Signed-off-by: Grygorii Strashko <grygorii.strashko@xxxxxx>
---
drivers/net/ethernet/ti/davinci_mdio.c | 21 ++++-----------------
1 file changed, 4 insertions(+), 17 deletions(-)

diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
index 0cca9de..f0f7128 100644
--- a/drivers/net/ethernet/ti/davinci_mdio.c
+++ b/drivers/net/ethernet/ti/davinci_mdio.c
[...]
@@ -425,16 +417,11 @@ static int davinci_mdio_remove(struct platform_device *pdev)

if (data->bus) {
mdiobus_unregister(data->bus);
- mdiobus_free(data->bus);
}

Remove {} please, it's not needed anymore, according to Documentation/CodingStyle.

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/