#if LINUX_VERSION_CODE ...
Added some blank lines to get a better linespacing in the (patched) code.
git-svn-id: svn://svn.berlios.de//socketcan/trunk@221
030b6a49-0b11-0410-94ab-
b0dab22257f2
return 65536; /* We can handle an infinite amount of data. :-) */
}
#endif
+
/*
* Handle the 'receiver data ready' interrupt.
* This function is called by the 'tty_io' module in the kernel when
if (tty->driver->flush_buffer)
tty->driver->flush_buffer(tty);
#endif
+
if (!test_bit(SLF_INUSE, &sl->flags)) {
/* Perform the low-level SLCAN initialization. */
sl->rcount = 0;
/* Done. We have linked the TTY line to a channel. */
rtnl_unlock();
+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
tty->receive_room = 65536; /* We don't flow control */
#endif
+
return sl->dev->base_addr;
err_free_chan:
#define DBG_FRAME(args...)
#define DBG_SKB(skb)
#endif
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
static void *kzalloc(size_t size, unsigned int __nocast flags)
{
extern struct timer_list stattimer; /* timer for statistics update */
extern struct s_stats stats; /* packet statistics */
extern struct s_pstats pstats; /* receive list statistics */
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
static void *kzalloc(size_t size, unsigned int __nocast flags)
{
if (err < 0)
return err;
#endif
+
proto_tab[proto] = cp;
/* use generic ioctl function if the module doesn't bring its own */
}
sk_set_owner(sk, proto_tab[protocol]->owner);
#endif
+
sock_init_data(sock, sk);
sk->sk_destruct = can_sock_destruct;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
if (sk->sk_prot->init)
ret = sk->sk_prot->init(sk);
+
#else
if (cp->init)
ret = cp->init(sk);
+
#endif
if (ret) {
.init = bcm_init,
};
#endif
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
static void *kzalloc(size_t size, unsigned int __nocast flags)
{