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 /net/can/raw.c | |
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 'net/can/raw.c')
-rw-r--r-- | net/can/raw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/can/raw.c b/net/can/raw.c index 883e9d74fddf..649acfa7c70a 100644 --- a/net/can/raw.c +++ b/net/can/raw.c | |||
@@ -742,7 +742,7 @@ static int raw_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
742 | return size; | 742 | return size; |
743 | } | 743 | } |
744 | 744 | ||
745 | static struct proto_ops raw_ops __read_mostly = { | 745 | static const struct proto_ops raw_ops = { |
746 | .family = PF_CAN, | 746 | .family = PF_CAN, |
747 | .release = raw_release, | 747 | .release = raw_release, |
748 | .bind = raw_bind, | 748 | .bind = raw_bind, |
@@ -751,7 +751,7 @@ static struct proto_ops raw_ops __read_mostly = { | |||
751 | .accept = sock_no_accept, | 751 | .accept = sock_no_accept, |
752 | .getname = raw_getname, | 752 | .getname = raw_getname, |
753 | .poll = datagram_poll, | 753 | .poll = datagram_poll, |
754 | .ioctl = NULL, /* use can_ioctl() from af_can.c */ | 754 | .ioctl = can_ioctl, /* use can_ioctl() from af_can.c */ |
755 | .listen = sock_no_listen, | 755 | .listen = sock_no_listen, |
756 | .shutdown = sock_no_shutdown, | 756 | .shutdown = sock_no_shutdown, |
757 | .setsockopt = raw_setsockopt, | 757 | .setsockopt = raw_setsockopt, |