lkml.org 
[lkml]   [2014]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] net: mdio-gpio: Use devm_ functions where possible
Hello.

On 04/16/2014 06:16 AM, Guenter Roeck wrote:

> This simplifies error path and deinit/removal functions.

> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/net/phy/mdio-gpio.c | 19 +++++--------------
> 1 file changed, 5 insertions(+), 14 deletions(-)

> diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c
> index e701433..e853066 100644
> --- a/drivers/net/phy/mdio-gpio.c
> +++ b/drivers/net/phy/mdio-gpio.c
> @@ -110,7 +110,7 @@ static struct mii_bus *mdio_gpio_bus_init(struct device *dev,
[...]
> @@ -163,13 +159,8 @@ out:
> static void mdio_gpio_bus_deinit(struct device *dev)
> {
> struct mii_bus *bus = dev_get_drvdata(dev);
> - struct mdio_gpio_info *bitbang = bus->priv;
>
> - dev_set_drvdata(dev, NULL);

You didn't even document this "drove-by" change. Ideally, it should have
been in a separate patch.

> - gpio_free(bitbang->mdio);
> - gpio_free(bitbang->mdc);
> free_mdio_bitbang(bus);
> - kfree(bitbang);
> }

WBR, Sergei



\
 
 \ /
  Last update: 2014-04-18 21:41    [W:0.109 / U:5.820 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site