From patchwork Sat Nov 5 13:04:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joachim Eastwood X-Patchwork-Id: 9413661 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3CB7A60723 for ; Sat, 5 Nov 2016 13:05:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D36328DC7 for ; Sat, 5 Nov 2016 13:05:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 215C42999B; Sat, 5 Nov 2016 13:05:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C1D2728DC7 for ; Sat, 5 Nov 2016 13:05:39 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c30fB-0003La-FT; Sat, 05 Nov 2016 13:05:37 +0000 Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c30f8-0002Ux-S5 for linux-rockchip@lists.infradead.org; Sat, 05 Nov 2016 13:05:35 +0000 Received: by mail-lf0-x243.google.com with SMTP id o141so4888311lff.1 for ; Sat, 05 Nov 2016 06:05:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MXYHTVGqwB4r/823fSGF14ftkAYZcKh1wRhpGbhBuag=; b=mJPBc5S27lWljsSU6xsjWoEnAiAKvp/d3j094MINKaibt+k6B/YkTPRvOAKcT71KG/ HBZnlSjpdnymqdzHVcRKF3rTYhFgmhc/1rQFb+ZhicNuBeA/B34RsA50vkT3mEigY+xL 0Lsln9xH5gs3g12Ur5imRFjqlY8uHMR08fzaxYQKhDtkjS5oQa6s+WHzohddhNt8pR7t QNKHwPTLd6FGrVwzn1JnU4Dr3v98bjakWgI3Gom6dF0WhCYeax8uUndc0vw/jfOOAygP 9aD0h5XJPvKAC5jY0W0ELw7Nt81EcP9BDybZZuvzHmAVEMFgOHVUiY/IliGunZsPNjid 4DhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MXYHTVGqwB4r/823fSGF14ftkAYZcKh1wRhpGbhBuag=; b=H2qd6WFEmkmMabQQuXqByZS2jDJAd4DEeHrQm6vd03Hfrrf83L3lwHtHV08iDrnQn+ K/fbpHHC4rz3aa7I2QRv35kX8Tg+Su4tV/EfITjrnYX/qf0TGJA5tufXCa57i0hmYqyF Egz5dLNPyqwipN9BcgHFPrnffKO72KbXUvK5YW8lkXfEoin3Pzi2QfPkELebDS/mweh3 uFu5NdUw6vArwfQ3ao3mBcYykGaPjb66c4U+l8UZjKmcQ7LXiLw7O4i2vHgj4jk3LGIO jt77l6ucLfB7CpzBYsy2xx5tb0fdXsJAOuRCUg1+xIJr2RFxjEap2L4BfnK3oWE5vAo6 5A4Q== X-Gm-Message-State: ABUngvcp6DonQOY1Ij/ddKVZ9yieRRGY9Nqa4wIBEnLSobXc3TdkjYhyQb0QsJBAsu4mvQ== X-Received: by 10.25.25.6 with SMTP id 6mr11864470lfz.54.1478351113738; Sat, 05 Nov 2016 06:05:13 -0700 (PDT) Received: from archthink.lan (244.89-11-254.nextgentel.com. [89.11.254.244]) by smtp.gmail.com with ESMTPSA id p3sm3221994lfe.1.2016.11.05.06.05.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Nov 2016 06:05:13 -0700 (PDT) From: Joachim Eastwood To: davem@davemloft.net Subject: [PATCH net-next 2/4] stmmac: dwmac-rk: turn exit into standard driver remove callback Date: Sat, 5 Nov 2016 14:04:50 +0100 Message-Id: <20161105130452.24226-3-manabian@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161105130452.24226-1-manabian@gmail.com> References: <20161105130452.24226-1-manabian@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161105_060535_168388_607E120E X-CRM114-Status: UNSURE ( 9.90 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: vpalatin@chromium.org, heiko@sntech.de, netdev@vger.kernel.org, Joachim Eastwood , linux-rockchip@lists.infradead.org, peppe.cavallaro@st.com MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Convert the exit hook into a standard driver remove function as the hook doesn't really buy us anything extra. Eventually the exit hook will be deprecated in favor of the driver remove function. Signed-off-by: Joachim Eastwood --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c index d91acd5..8506881 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c @@ -908,13 +908,6 @@ static int rk_gmac_init(struct platform_device *pdev, void *priv) return rk_gmac_powerup(bsp_priv); } -static void rk_gmac_exit(struct platform_device *pdev, void *priv) -{ - struct rk_priv_data *bsp_priv = priv; - - rk_gmac_powerdown(bsp_priv); -} - static void rk_fix_speed(void *priv, unsigned int speed) { struct rk_priv_data *bsp_priv = priv; @@ -951,7 +944,6 @@ static int rk_gmac_probe(struct platform_device *pdev) plat_dat->has_gmac = true; plat_dat->init = rk_gmac_init; - plat_dat->exit = rk_gmac_exit; plat_dat->fix_mac_speed = rk_fix_speed; plat_dat->bsp_priv = rk_gmac_setup(pdev, data); @@ -965,6 +957,16 @@ static int rk_gmac_probe(struct platform_device *pdev) return stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res); } +static int rk_gmac_remove(struct platform_device *pdev) +{ + struct rk_priv_data *bsp_priv = get_stmmac_bsp_priv(&pdev->dev); + int ret = stmmac_dvr_remove(&pdev->dev); + + rk_gmac_powerdown(bsp_priv); + + return ret; +} + #ifdef CONFIG_PM_SLEEP static int rk_gmac_suspend(struct device *dev) { @@ -1008,7 +1010,7 @@ MODULE_DEVICE_TABLE(of, rk_gmac_dwmac_match); static struct platform_driver rk_gmac_dwmac_driver = { .probe = rk_gmac_probe, - .remove = stmmac_pltfr_remove, + .remove = rk_gmac_remove, .driver = { .name = "rk_gmac-dwmac", .pm = &rk_gmac_pm_ops,