Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247075
b: refs/heads/master
c: 1650629
h: refs/heads/master
i:
  247073: eeba0b9
  247071: 4c90494
v: v3
  • Loading branch information
Kurt Van Dijck authored and David S. Miller committed May 4, 2011
1 parent 99392ea commit 7f93e12
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5a412ad7f4c95bb5b756aa12b52646e857e7c75d
refs/heads/master: 1650629d1800bf05ad775f974e931ca2fa03b0ff
4 changes: 2 additions & 2 deletions trunk/include/linux/can/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ struct can_proto {

/* function prototypes for the CAN networklayer core (af_can.c) */

extern int can_proto_register(struct can_proto *cp);
extern void can_proto_unregister(struct can_proto *cp);
extern int can_proto_register(const struct can_proto *cp);
extern void can_proto_unregister(const struct can_proto *cp);

extern int can_rx_register(struct net_device *dev, canid_t can_id,
canid_t mask,
Expand Down
12 changes: 6 additions & 6 deletions trunk/net/can/af_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static DEFINE_SPINLOCK(can_rcvlists_lock);
static struct kmem_cache *rcv_cache __read_mostly;

/* table of registered CAN protocols */
static struct can_proto *proto_tab[CAN_NPROTO] __read_mostly;
static const struct can_proto *proto_tab[CAN_NPROTO] __read_mostly;
static DEFINE_MUTEX(proto_tab_lock);

struct timer_list can_stattimer; /* timer for statistics update */
Expand Down Expand Up @@ -115,9 +115,9 @@ static void can_sock_destruct(struct sock *sk)
skb_queue_purge(&sk->sk_receive_queue);
}

static struct can_proto *can_try_module_get(int protocol)
static const struct can_proto *can_try_module_get(int protocol)
{
struct can_proto *cp;
const struct can_proto *cp;

rcu_read_lock();
cp = rcu_dereference(proto_tab[protocol]);
Expand All @@ -132,7 +132,7 @@ static int can_create(struct net *net, struct socket *sock, int protocol,
int kern)
{
struct sock *sk;
struct can_proto *cp;
const struct can_proto *cp;
int err = 0;

sock->state = SS_UNCONNECTED;
Expand Down Expand Up @@ -691,7 +691,7 @@ static int can_rcv(struct sk_buff *skb, struct net_device *dev,
* -EBUSY protocol already in use
* -ENOBUF if proto_register() fails
*/
int can_proto_register(struct can_proto *cp)
int can_proto_register(const struct can_proto *cp)
{
int proto = cp->protocol;
int err = 0;
Expand Down Expand Up @@ -728,7 +728,7 @@ EXPORT_SYMBOL(can_proto_register);
* can_proto_unregister - unregister CAN transport protocol
* @cp: pointer to CAN protocol structure
*/
void can_proto_unregister(struct can_proto *cp)
void can_proto_unregister(const struct can_proto *cp)
{
int proto = cp->protocol;

Expand Down
2 changes: 1 addition & 1 deletion trunk/net/can/bcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1601,7 +1601,7 @@ static struct proto bcm_proto __read_mostly = {
.init = bcm_init,
};

static struct can_proto bcm_can_proto __read_mostly = {
static const struct can_proto bcm_can_proto = {
.type = SOCK_DGRAM,
.protocol = CAN_BCM,
.ops = &bcm_ops,
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/can/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ static struct proto raw_proto __read_mostly = {
.init = raw_init,
};

static struct can_proto raw_can_proto __read_mostly = {
static const struct can_proto raw_can_proto = {
.type = SOCK_RAW,
.protocol = CAN_RAW,
.ops = &raw_ops,
Expand Down

0 comments on commit 7f93e12

Please sign in to comment.