From patchwork Tue Jul 28 22:09:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joachim Eastwood X-Patchwork-Id: 6888591 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E556B9F39D for ; Tue, 28 Jul 2015 22:10:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A35712074E for ; Tue, 28 Jul 2015 22:09:59 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id D27DA2027D for ; Tue, 28 Jul 2015 22:09:58 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZKD4Q-0003CU-8Q; Tue, 28 Jul 2015 22:09:58 +0000 Received: from mail-lb0-x242.google.com ([2a00:1450:4010:c04::242]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZKD4O-0002zl-AW for linux-rockchip@lists.infradead.org; Tue, 28 Jul 2015 22:09:56 +0000 Received: by lbvb1 with SMTP id b1so5952712lbv.2 for ; Tue, 28 Jul 2015 15:09:34 -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=vA0WkmVfPZXcOn7bcHIwLc8cWpCGqhQaeDjEz0nzgmY=; b=oRXe+AWYqsEYkdYp/ZzxDluJeyEzvVd34lIB0UVeyBG5z3HNSttWx4LYSCHZXncXN3 CmJifneN4pO8M1FWmCRpFSk878YDZl82aArZC7EvFT5ew3BrHQOxkNkwiR0pb0zAlRKt iHjHVuwk9HjeVSoMdCs7ysbd6I7arNuiozM9nE2Udft2pNCo7OPbUb7Gls68VEgvF1QN 9xedgComr8i1diuqz5xO87ByDbPIT6pve2uzfW4PmXK+KXMcOj+uuKTVYORz0VYllAol 5dzqGLKJZCJ5gb1NQTbELqI+2BaQV9v3YQ4fTybC9GpzSETBAp0E0z80LRGkm0UA6VPh KSwQ== X-Received: by 10.112.220.7 with SMTP id ps7mr34878482lbc.72.1438121374501; Tue, 28 Jul 2015 15:09:34 -0700 (PDT) Received: from localhost.localdomain ([89.11.213.141]) by smtp.gmail.com with ESMTPSA id kv1sm4913123lbb.48.2015.07.28.15.09.33 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 28 Jul 2015 15:09:33 -0700 (PDT) From: Joachim Eastwood To: peppe.cavallaro@st.com, heiko@sntech.de, roger.chen@rock-chips.com, davem@davemloft.net Subject: [PATCH net-next 13/17] stmmac: dwmac-rk: make rk_gmac_ops structs static const Date: Wed, 29 Jul 2015 00:09:00 +0200 Message-Id: <1438121344-5304-14-git-send-email-manabian@gmail.com> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1438121344-5304-1-git-send-email-manabian@gmail.com> References: <1438121344-5304-1-git-send-email-manabian@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150728_150956_551644_799DB6B4 X-CRM114-Status: UNSURE ( 9.10 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) 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: netdev@vger.kernel.org, Joachim Eastwood , linux-rockchip@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Mark the rk_gmac_ops structures as static const as they should be. Signed-off-by: Joachim Eastwood --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c index 65c1e1afe6a8..5d8042ea8370 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c @@ -46,7 +46,7 @@ struct rk_priv_data { struct platform_device *pdev; int phy_iface; struct regulator *regulator; - struct rk_gmac_ops *ops; + const struct rk_gmac_ops *ops; bool clk_enabled; bool clock_input; @@ -177,7 +177,7 @@ static void rk3288_set_rmii_speed(struct rk_priv_data *bsp_priv, int speed) } } -struct rk_gmac_ops rk3288_ops = { +static const struct rk_gmac_ops rk3288_ops = { .set_to_rgmii = rk3288_set_to_rgmii, .set_to_rmii = rk3288_set_to_rmii, .set_rgmii_speed = rk3288_set_rgmii_speed, @@ -289,7 +289,7 @@ static void rk3368_set_rmii_speed(struct rk_priv_data *bsp_priv, int speed) } } -struct rk_gmac_ops rk3368_ops = { +static const struct rk_gmac_ops rk3368_ops = { .set_to_rgmii = rk3368_set_to_rgmii, .set_to_rmii = rk3368_set_to_rmii, .set_rgmii_speed = rk3368_set_rgmii_speed, @@ -448,7 +448,7 @@ static int phy_power_on(struct rk_priv_data *bsp_priv, bool enable) } static struct rk_priv_data *rk_gmac_setup(struct platform_device *pdev, - struct rk_gmac_ops *ops) + const struct rk_gmac_ops *ops) { struct rk_priv_data *bsp_priv; struct device *dev = &pdev->dev;