Ying Xue | 15 Jun 2012 04:54
Favicon

[PATCH] tipc: constify eth_media_info struct

The eth_media_info structure is read only in tipc_register_media(),
so declare const to it.

Signed-off-by: Ying Xue <ying.xue <at> windriver.com>
---
 net/tipc/bearer.c    |    2 +-
 net/tipc/bearer.h    |    2 +-
 net/tipc/eth_media.c |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
index bb00d72..546c5b2 100644
--- a/net/tipc/bearer.c
+++ b/net/tipc/bearer.c
 <at>  <at>  -81,7 +81,7  <at>  <at>  static struct tipc_media *media_find_id(u8 type)
  *
  * Bearers for this media type must be activated separately at a later stage.
  */
-int tipc_register_media(struct tipc_media *m_ptr)
+int tipc_register_media(const struct tipc_media *m_ptr)
 {
 	int res = -EINVAL;

diff --git a/net/tipc/bearer.h b/net/tipc/bearer.h
index e3b2be3..09995b7 100644
--- a/net/tipc/bearer.h
+++ b/net/tipc/bearer.h
 <at>  <at>  -161,7 +161,7  <at>  <at>  extern struct tipc_bearer tipc_bearers[];
 /*
  * TIPC routines available to supported media types
(Continue reading)


Gmane