lkml.org 
[lkml]   [2019]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 3.16 17/87] net: stmmac: fix reset gpio free missing
    3.16.75-rc1 review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Jisheng Zhang <Jisheng.Zhang@synaptics.com>

    commit 49ce881c0d4c4a7a35358d9dccd5f26d0e56fc61 upstream.

    Commit 984203ceff27 ("net: stmmac: mdio: remove reset gpio free")
    removed the reset gpio free, when the driver is unbinded or rmmod,
    we miss the gpio free.

    This patch uses managed API to request the reset gpio, so that the
    gpio could be freed properly.

    Fixes: 984203ceff27 ("net: stmmac: mdio: remove reset gpio free")
    Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    [bwh: Backported to 3.16: adjust context]
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    ---
    drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
    +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
    @@ -159,7 +159,8 @@ int stmmac_mdio_reset(struct mii_bus *bu
    reset_gpio = data->reset_gpio;
    active_low = data->active_low;

    - if (!gpio_request(reset_gpio, "mdio-reset")) {
    + if (!devm_gpio_request(priv->device, reset_gpio,
    + "mdio-reset")) {
    gpio_direction_output(reset_gpio, active_low ? 1 : 0);
    udelay(data->delays[0]);
    gpio_set_value(reset_gpio, active_low ? 0 : 1);
    \
     
     \ /
      Last update: 2019-10-02 21:11    [W:4.067 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site