diff options
author | Oliver Hartkopp <socketcan@hartkopp.net> | 2011-03-22 04:27:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-28 02:34:59 -0400 |
commit | 53914b67993c724cec585863755c9ebc8446e83b (patch) | |
tree | 851d031dd41a74c7e03436ca7c98455fee1c598e /include/linux/can | |
parent | 3b261ade4224852ed841ecfd13876db812846e96 (diff) |
can: make struct proto const
can_ioctl is the only reason for struct proto to be non-const.
script/check-patch.pl suggests struct proto be const.
Setting the reference to the common can_ioctl() in all CAN protocols directly
removes the need to make the struct proto writable in af_can.c
Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/can')
-rw-r--r-- | include/linux/can/core.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/can/core.h b/include/linux/can/core.h index 6c507bea275f..6f70a6d3a16e 100644 --- a/include/linux/can/core.h +++ b/include/linux/can/core.h | |||
@@ -36,10 +36,10 @@ | |||
36 | * @prot: pointer to struct proto structure. | 36 | * @prot: pointer to struct proto structure. |
37 | */ | 37 | */ |
38 | struct can_proto { | 38 | struct can_proto { |
39 | int type; | 39 | int type; |
40 | int protocol; | 40 | int protocol; |
41 | struct proto_ops *ops; | 41 | const struct proto_ops *ops; |
42 | struct proto *prot; | 42 | struct proto *prot; |
43 | }; | 43 | }; |
44 | 44 | ||
45 | /* function prototypes for the CAN networklayer core (af_can.c) */ | 45 | /* function prototypes for the CAN networklayer core (af_can.c) */ |
@@ -58,5 +58,6 @@ extern void can_rx_unregister(struct net_device *dev, canid_t can_id, | |||
58 | void *data); | 58 | void *data); |
59 | 59 | ||
60 | extern int can_send(struct sk_buff *skb, int loop); | 60 | extern int can_send(struct sk_buff *skb, int loop); |
61 | extern int can_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); | ||
61 | 62 | ||
62 | #endif /* CAN_CORE_H */ | 63 | #endif /* CAN_CORE_H */ |