summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Cartwright2015-03-09 17:14:39 +0100
committerDavid S. Miller2015-03-09 20:53:42 +0100
commit0b2eb3e9bc738c23784b9281dd035ee0b450d98a (patch)
tree4a95c77a287f9a3c30359ea6ad885b4b8ceb8f8b
parentMerge tag 'linux-can-fixes-for-4.0-20150309' of git://git.kernel.org/pub/scm/... (diff)
downloadkernel-qcow2-linux-0b2eb3e9bc738c23784b9281dd035ee0b450d98a.tar.gz
kernel-qcow2-linux-0b2eb3e9bc738c23784b9281dd035ee0b450d98a.tar.xz
kernel-qcow2-linux-0b2eb3e9bc738c23784b9281dd035ee0b450d98a.zip
net: macb: constify macb configuration data
The configurations are not modified by the driver. Make them 'const' so that they may be placed in a read-only section. Signed-off-by: Josh Cartwright <joshc@ni.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/cadence/macb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
index ad76b8e35a00..81d41539fcba 100644
--- a/drivers/net/ethernet/cadence/macb.c
+++ b/drivers/net/ethernet/cadence/macb.c
@@ -2113,17 +2113,17 @@ static const struct net_device_ops macb_netdev_ops = {
};
#if defined(CONFIG_OF)
-static struct macb_config pc302gem_config = {
+static const struct macb_config pc302gem_config = {
.caps = MACB_CAPS_SG_DISABLED | MACB_CAPS_GIGABIT_MODE_AVAILABLE,
.dma_burst_length = 16,
};
-static struct macb_config sama5d3_config = {
+static const struct macb_config sama5d3_config = {
.caps = MACB_CAPS_SG_DISABLED | MACB_CAPS_GIGABIT_MODE_AVAILABLE,
.dma_burst_length = 16,
};
-static struct macb_config sama5d4_config = {
+static const struct macb_config sama5d4_config = {
.caps = 0,
.dma_burst_length = 4,
};
@@ -2154,7 +2154,7 @@ static void macb_configure_caps(struct macb *bp)
if (bp->pdev->dev.of_node) {
match = of_match_node(macb_dt_ids, bp->pdev->dev.of_node);
if (match && match->data) {
- config = (const struct macb_config *)match->data;
+ config = match->data;
bp->caps = config->caps;
/*