Re: [PATCH v2 3/3] serial: core: Add sysfs links for serial core port instances for ttys

From: Tony Lindgren
Date: Wed Sep 13 2023 - 08:30:48 EST


* Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> [230912 15:17]:
> On Tue, Sep 12, 2023 at 02:03:45PM +0300, Tony Lindgren wrote:
> > + tty_dev = device_find_child(port->dev, &match, serial_match_port);
>
> Can be written as
>
> tty_dev = device_find_child(phys_dev, &match, serial_match_port);
>
> ?
>
> > + if (tty_dev) {
> > + sysfs_remove_link(&port->port_dev->dev.kobj, "tty");
>
> Can be written as
>
> sysfs_remove_link(&port_dev->dev.kobj, "tty");
>
> can't be?

Yes that's shorter.

Thanks,

Tony