From patchwork Sat Nov 5 13:04:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joachim Eastwood X-Patchwork-Id: 9413667 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 1A6AA6022E for ; Sat, 5 Nov 2016 13:05:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C3F728D97 for ; Sat, 5 Nov 2016 13:05:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 010872994F; Sat, 5 Nov 2016 13:05:43 +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 43EFC28D97 for ; Sat, 5 Nov 2016 13:05:42 +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 1c30fF-0003NU-Lt; Sat, 05 Nov 2016 13:05:41 +0000 Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c30fC-0002Zj-5i for linux-rockchip@lists.infradead.org; Sat, 05 Nov 2016 13:05:39 +0000 Received: by mail-lf0-x244.google.com with SMTP id 98so2818606lfs.0 for ; Sat, 05 Nov 2016 06:05:17 -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=R/SWTYNTKtZv89lZofRJCji7uFHgnYIWZvGSOjKIg0w=; b=oY4eDOwTTtfEzVIFJGp4AIk6jwPLtZFRlmOkZCeWwEOWALDwql6bBupPpZ/sUKTQNI FpskyU8abaSaUoDtgJan3rFxFPECgvNy/dt7+V+WbISk4nA7xb1xWb/Xj9nCXXc++G0n GkfgF+OHo4Hc0iRFHtMyJX9Qex3Zi5lOLExDFjOBM+ia9euXVC5I/AWzWaXFZ/9IME1Y N59vpkhCzd7TKxB038FN2z6rkXJJs4VYXzKFtjpcOhD/JdTMxWBUtrcFElMuyU1kZ+vl XCjg3Azgn5U4a55yZyqZP9Lq+Qq0TRm2SVkqb9yHzR1rcW0V7usRD0o6ssVWc+r2aaBd n9dw== 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=R/SWTYNTKtZv89lZofRJCji7uFHgnYIWZvGSOjKIg0w=; b=N6B1xcQ8r2zvlQHGKQAh7Ng0oW8XeQ2l4cZgASjJuQx24E23rweXWd6UhvFH1wmjXN KryPeooKCkzntr6hFGJzIX3x12MmJuP0SXY/oOYAA3EmuSE5H7dVtMjOoy6edRXRt9Ze saCqkoM86ZY0GF05GowIV1nfaJo5Q24bOxiLQNEHXFDnnYOOOvhC/VpNPSoD+E74aUaE 3iKuDoyO4d6aj0xpbfHvX6JeTg1JMROZSl0h1w6hBoAevfytmsW3Ha/H9A+6yXpp1qGX pXlcIG5yfKp3wUu5B/OoLx7GT2wTjvW52es5D0nPMNY5g+5F3rsUaLpY21YvvWvxXT+d T0LQ== X-Gm-Message-State: ABUngve0q3yggVKU0ha3NKeF2nc5Uf+rmKkzNYAUGlRnhpAUk5LQUAfxi5qp6fUHnzgB7g== X-Received: by 10.25.151.149 with SMTP id z143mr12357366lfd.38.1478351115905; Sat, 05 Nov 2016 06:05:15 -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.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Nov 2016 06:05:15 -0700 (PDT) From: Joachim Eastwood To: davem@davemloft.net Subject: [PATCH net-next 4/4] Revert "net: stmmac: allow to split suspend/resume from init/exit callbacks" Date: Sat, 5 Nov 2016 14:04:52 +0100 Message-Id: <20161105130452.24226-5-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_060538_770163_6F170025 X-CRM114-Status: UNSURE ( 9.59 ) 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 Instead of adding hooks inside stmmac_platform it is better to just use the standard PM callbacks within the specific dwmac-driver. This only used by the dwmac-rk driver. This reverts commit cecbc5563a02 ("stmmac: allow to split suspend/resume from init/exit callbacks"). Signed-off-by: Joachim Eastwood --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 8 ++------ include/linux/stmmac.h | 2 -- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 0a0d6a8..4d544c3 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -417,9 +417,7 @@ static int stmmac_pltfr_suspend(struct device *dev) struct platform_device *pdev = to_platform_device(dev); ret = stmmac_suspend(dev); - if (priv->plat->suspend) - priv->plat->suspend(pdev, priv->plat->bsp_priv); - else if (priv->plat->exit) + if (priv->plat->exit) priv->plat->exit(pdev, priv->plat->bsp_priv); return ret; @@ -438,9 +436,7 @@ static int stmmac_pltfr_resume(struct device *dev) struct stmmac_priv *priv = netdev_priv(ndev); struct platform_device *pdev = to_platform_device(dev); - if (priv->plat->resume) - priv->plat->resume(pdev, priv->plat->bsp_priv); - else if (priv->plat->init) + if (priv->plat->init) priv->plat->init(pdev, priv->plat->bsp_priv); return stmmac_resume(dev); diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index 705840e..3537fb3 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -135,8 +135,6 @@ struct plat_stmmacenet_data { void (*bus_setup)(void __iomem *ioaddr); int (*init)(struct platform_device *pdev, void *priv); void (*exit)(struct platform_device *pdev, void *priv); - void (*suspend)(struct platform_device *pdev, void *priv); - void (*resume)(struct platform_device *pdev, void *priv); void *bsp_priv; struct stmmac_axi *axi; int has_gmac4;