serport: place serport serio device correctly in the device tree
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Mon, 9 Aug 2010 14:22:50 +0000 (18:22 +0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 22 Oct 2010 17:19:58 +0000 (10:19 -0700)
Make serport serio device to be a child of corresponding tty device
instead of just hanging at /sys/devices/serioX.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/input/serio/serport.c

index 6d345112bcb758c1ef5dda8c538659328af48759..6e362de3f412fe32a5755bdd49aed8bd891fecb5 100644 (file)
@@ -165,6 +165,7 @@ static ssize_t serport_ldisc_read(struct tty_struct * tty, struct file * file, u
        serio->open = serport_serio_open;
        serio->close = serport_serio_close;
        serio->port_data = serport;
+       serio->dev.parent = tty->dev;
 
        serio_register_port(serport->serio);
        printk(KERN_INFO "serio: Serial port %s\n", tty_name(tty, name));