From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,T_DKIMWL_WL_HIGH,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24DE6C28EBD for ; Sun, 9 Jun 2019 17:17:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E8FFF20652 for ; Sun, 9 Jun 2019 17:17:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560100631; bh=4rr3Cnn4SFuNKgsTWHPpaiWyKHQ01figVV8P6fNppQk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=E/bb6sHegI60bScc2/D14LMdoWxSzzGRm562ExJB51/7KJ/XsVy2i5NhpxxhpsNIS WokKlHNRvUhtVqOx3WCviHzcawDsrxc69esxMYeTRkbjw/jHOay1TzCwc7LogMMPdq mSUSeTGiL7W+IDRJgVGT+j5PH90natRbIZ4ZynsM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732185AbfFIQwV (ORCPT ); Sun, 9 Jun 2019 12:52:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:53128 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729789AbfFIQwT (ORCPT ); Sun, 9 Jun 2019 12:52:19 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 352B7205ED; Sun, 9 Jun 2019 16:52:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560099138; bh=4rr3Cnn4SFuNKgsTWHPpaiWyKHQ01figVV8P6fNppQk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V77i9t9DJpDB0b6DrR09oiF5/Fc5/S9CE6rAY4vOTrGjVE11rIu2hiCT4qdsPkzjh ay7f1VZSEUlLkCg4g85pZoPPKem7nDzZngqZiivB8x1X/FshUnBFz9sHKcMDicUNpY cx2sNd0u+4FWhXqQJZBS3FezyUDahFFs8gNlnrio= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jisheng Zhang , "David S. Miller" Subject: [PATCH 4.9 05/83] net: stmmac: fix reset gpio free missing Date: Sun, 9 Jun 2019 18:41:35 +0200 Message-Id: <20190609164128.120415987@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190609164127.843327870@linuxfoundation.org> References: <20190609164127.843327870@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jisheng Zhang [ Upstream commit 49ce881c0d4c4a7a35358d9dccd5f26d0e56fc61 ] 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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- 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 @@ -240,7 +240,8 @@ int stmmac_mdio_reset(struct mii_bus *bu of_property_read_u32_array(np, "snps,reset-delays-us", data->delays, 3); - if (gpio_request(data->reset_gpio, "mdio-reset")) + if (devm_gpio_request(priv->device, data->reset_gpio, + "mdio-reset")) return 0; }