]> rtime.felk.cvut.cz Git - socketcan-devel.git/blobdiff - kernel/2.6/net/can/isotp.c
Add missinf includes for tasklet usage.
[socketcan-devel.git] / kernel / 2.6 / net / can / isotp.c
index 21477e2a4c72bf3e59b17a02f2b2b353c1704829..f15f788a34d113e42efd8732fa3c858e297cb2ed 100644 (file)
@@ -54,6 +54,8 @@
 #include <linux/module.h>
 #include <linux/version.h>
 #include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/hrtimer.h>
 #include <linux/wait.h>
 #include <linux/uio.h>
 #include <linux/net.h>
@@ -795,7 +797,12 @@ static int isotp_recvmsg(struct kiocb *iocb, struct socket *sock,
 static int isotp_release(struct socket *sock)
 {
        struct sock *sk = sock->sk;
-       struct isotp_sock *so = isotp_sk(sk);
+       struct isotp_sock *so;
+
+       if (!sk)
+               return 0;
+
+       so = isotp_sk(sk);
 
        /* wait for complete transmission of current pdu */
        wait_event_interruptible(so->wait, so->tx.state == ISOTP_IDLE);
@@ -1153,7 +1160,7 @@ static struct proto isotp_proto __read_mostly = {
        .init       = isotp_init,
 };
 
-static struct can_proto isotp_can_proto __read_mostly = {
+static const struct can_proto isotp_can_proto = {
        .type       = SOCK_DGRAM,
        .protocol   = CAN_ISOTP,
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)