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,URIBL_BLOCKED,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 95BF4C2BCA1 for ; Fri, 7 Jun 2019 15:59:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6CC0220657 for ; Fri, 7 Jun 2019 15:59:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559923178; bh=9m0GNLHWvMtlUluXfR1OK+DeycbfGJ9XdKQT+o4YxJA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Z6I5kdatyovFqssxja5w/elnFa8rNmZFu1BcL+QH8naKgr+ho7zdnp66zQIp6J3GF UXUjfbkXX5FQlKQ+iFK5W7TiS3B+TlSrimKNLwSMm6rhJHV/6e2QliPBDapXtwWkzA lrAxZM0zxY1aIlsYGZL7FEcEVivTgotrqM6WxHa8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730350AbfFGPli (ORCPT ); Fri, 7 Jun 2019 11:41:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:51474 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730327AbfFGPlc (ORCPT ); Fri, 7 Jun 2019 11:41:32 -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 A9F61214D8; Fri, 7 Jun 2019 15:41:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559922092; bh=9m0GNLHWvMtlUluXfR1OK+DeycbfGJ9XdKQT+o4YxJA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dGv2YM96YL6PUKdp/dPzZLB9FThkE7dufxRKCIqulqwwUKlg52WTEZtoyQTycHps/ BdwzDPjxg4aH3u2lubI1bjH6CoSyIME+xt4UklJeaZW07d0ul6R59/3LPzMxoAmYzb HMCiGPpM+f8gZXB1WI1AfCVFOH+a0xNZgcKzxc1k= 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.14 06/69] net: stmmac: fix reset gpio free missing Date: Fri, 7 Jun 2019 17:38:47 +0200 Message-Id: <20190607153849.045512136@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190607153848.271562617@linuxfoundation.org> References: <20190607153848.271562617@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 @@ -157,7 +157,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; }