.oO(I guess you'll have me for moaning again, but..)
>
> static int __init n_hdlc_init(void)
> {
> - static struct tty_ldisc n_hdlc_ldisc;
> + static struct tty_ldisc n_hdlc_ldisc = {
Usual Linux style is to have this outside of any function scope.
That'll get important once we get a saner tty_unregister_ldisc
prototype.
> + TTY_LDISC_MAGIC, /* magic */
> + "hdlc", /* name */
Please use C99 named initializers.
> + 0, /* num */
> + 0, /* flags */
And no need to initialize anything to 0/NULL.
It should look like:
static struct tty_ldisc n_hdlc_ldisc = {
.owner = THIS_MODULE,
.magic = TTY_LDISC_MAGIC,
.name = "hdlc",
.open = n_hdlc_tty_open,
.close = n_hdlc_tty_close,
.read = n_hdlc_tty_read,
.write = n_hdlc_tty_write,
.ioctl = n_hdlc_tty_ioctl,
.poll = n_hdlc_tty_poll,
.receive_buf = n_hdlc_tty_receive,
.receive_room = n_hdlc_tty_room,
.write_wakeup = n_hdlc_tty_wakeup,
};
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/