All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joachim Eastwood <manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: peppe.cavallaro-qxv4g6HH51o@public.gmane.org,
	heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org,
	roger.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Joachim Eastwood
	<manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
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	[thread overview]
Message-ID: <1438121344-5304-14-git-send-email-manabian@gmail.com> (raw)
In-Reply-To: <1438121344-5304-1-git-send-email-manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Mark the rk_gmac_ops structures as static const as they should be.

Signed-off-by: Joachim Eastwood <manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 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;
-- 
1.8.0

  parent reply	other threads:[~2015-07-28 22:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-28 22:08 [PATCH net-next 00/17] stmmac clean up for 4.3 part2 Joachim Eastwood
2015-07-28 22:08 ` [PATCH net-next 01/17] stmmac: fix ptr_ret.cocci warning Joachim Eastwood
2015-07-28 22:08 ` [PATCH net-next 02/17] stmmac: dwmac-ipq806x: move ipq806x_gmac_fix_mac_speed function Joachim Eastwood
2015-07-28 22:08 ` [PATCH net-next 03/17] stmmac: dwmac-ipq806x: turn setup callback into a probe function Joachim Eastwood
2015-07-28 22:08 ` [PATCH net-next 04/17] stmmac: dwmac-socfpga: move socfpga_dwmac_probe function Joachim Eastwood
2015-07-28 22:08 ` [PATCH net-next 05/17] stmmac: dwmac-socfpga: turn setup callback into a probe function Joachim Eastwood
2015-07-28 22:08 ` [PATCH net-next 06/17] stmmac: dwmac-sunxi: move sun7i_gmac_setup function Joachim Eastwood
2015-07-28 22:08 ` [PATCH net-next 07/17] stmmac: dwmac-sunxi: turn setup callback into a probe function Joachim Eastwood
2015-07-28 22:08 ` [PATCH net-next 08/17] stmmac: dwmac-sti: " Joachim Eastwood
2015-07-28 22:08 ` [PATCH net-next 10/17] stmmac: move stmmac_pltfr_probe into dwmac-generic Joachim Eastwood
2015-07-28 22:08 ` [PATCH net-next 11/17] stmmac: let dwmac-* drivers handle their own match data Joachim Eastwood
2015-07-28 22:08 ` [PATCH net-next 12/17] stmmac: dwmac-sti: use custom of match structure Joachim Eastwood
     [not found] ` <1438121344-5304-1-git-send-email-manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-07-28 22:08   ` [PATCH net-next 09/17] stmmac: dwmac-rk: create a new probe function Joachim Eastwood
2015-07-28 22:09   ` Joachim Eastwood [this message]
2015-07-28 22:09 ` [PATCH net-next 14/17] stmmac: dwmac-rk: use rk_gmac_ops as of match data Joachim Eastwood
2015-07-28 22:09 ` [PATCH net-next 15/17] stmmac: remove unused stmmac_of_data struct Joachim Eastwood
2015-07-28 22:09 ` [PATCH net-next 16/17] stmmac: remove setup/free glue callbacks Joachim Eastwood
2015-07-28 22:09 ` [PATCH net-next 17/17] stmmac: dwmac-sti: refactor the init " Joachim Eastwood
2015-07-29  7:13 ` [PATCH net-next 00/17] stmmac clean up for 4.3 part2 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1438121344-5304-14-git-send-email-manabian@gmail.com \
    --to=manabian-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
    --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=peppe.cavallaro-qxv4g6HH51o@public.gmane.org \
    --cc=roger.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.