Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1187407ybn; Wed, 2 Oct 2019 12:08:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqy5l6OTqQyg23nchc0WFlvl99t1JXNCIwsrvfReg0mdfjIDPMGmziKXPz+MhuK8DfCWCyto X-Received: by 2002:a50:b7ed:: with SMTP id i42mr5429542ede.52.1570043337973; Wed, 02 Oct 2019 12:08:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570043337; cv=none; d=google.com; s=arc-20160816; b=OIOQY+vP/LIHSS1n3F5O6kzHTCK0KUaaOEr1okUH2s/ZoXYmSpxRbTV6WRWUf6uI5f 6WwACF8l2eW17thsynp/MLzkBRrb5yoLPgPplJtp2WriL80gb4NgUNNdtWsyYL1O+73s kBNOH2IGQKfLw4MELkhzMgSv1g3QIgJqgnxIkVl49PVtIQorUXEiG3eNfXim5F6sBqUf yy6/Ci7T2Tk/Kp1gfEPqdcmFapnXZrAyF2MIvyfdVlM26Qu8Jx9bYqGzbFVBTGtv8eKQ /u8f1LARpWz5gXKNCYJpMXER3ZT8oRsuHtxgWwykEjl8XSQ9drj9asLGhUYd0q2S4Ci2 ioXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=53fMiI6tvzpHIBqShQMv89MbC/2O9FyyaOophhzlJa0=; b=lZlnAmb9k/PY25irDF1E9/whLvZetqCd952r2SL4StmWCW5IBRzXGSOjN9zESZTVLh KWa8S4zHeafB7xz6nWm/PMx4YvWr9bIJI4Co5wQb1IqXmXaVkvGVuYi/RkW2zSQ8c0J7 eJTpDqQRxOrCt9SgoiRHK3hSNaOKhb9kLQ8ypvRKM536MDWbWvN38dT7y2q+bKykDr3w LSTvrO7kaCSNDCeUZAIBrNtXo2Lv1ueLWFxokLEYCA+tGC+c07C7HHjaYzmxKcWwfoqc ShFrVRAUIL5OjijeByZin3uawFOYFfcHOCw5/TzOi9fxXxloej4AT/fr017YoWXRD0Ek tQIA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h2si34088edw.29.2019.10.02.12.08.33; Wed, 02 Oct 2019 12:08:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729327AbfJBTIQ (ORCPT + 99 others); Wed, 2 Oct 2019 15:08:16 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:35274 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729049AbfJBTIJ (ORCPT ); Wed, 2 Oct 2019 15:08:09 -0400 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iFjyn-00035c-QY; Wed, 02 Oct 2019 20:08:05 +0100 Received: from ben by deadeye with local (Exim 4.92.1) (envelope-from ) id 1iFjyn-0003bB-DM; Wed, 02 Oct 2019 20:08:05 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, Denis Kirjanov , "Jisheng Zhang" , "David S. Miller" Date: Wed, 02 Oct 2019 20:06:51 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 17/87] net: stmmac: fix reset gpio free missing In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.75-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Jisheng Zhang 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 Signed-off-by: David S. Miller [bwh: Backported to 3.16: adjust context] Signed-off-by: Ben Hutchings --- 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);