All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Aidan Stewart <astewart@tektelic.com>
Cc: jirislaby@kernel.org, tony@atomide.com,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] serial: core: restore of_node information in sysfs
Date: Tue, 17 Jun 2025 06:44:18 +0200	[thread overview]
Message-ID: <2025061746-raking-gusto-d1f3@gregkh> (raw)
In-Reply-To: <20250616162154.9057-1-astewart@tektelic.com>

On Mon, Jun 16, 2025 at 10:21:54AM -0600, Aidan Stewart wrote:
> Since in v6.8-rc1, the of_node symlink under tty devices is
> missing. This breaks any udev rules relying on this information.
> 
> Link the of_node information in the serial controller device with the
> parent defined in the device tree. This will also apply to the serial
> device which takes the serial controller as a parent device.
> 
> Fixes: b286f4e87e32 ("serial: core: Move tty and serdev to be children of serial core port device")
> Cc: stable@vger.kernel.org
> Signed-off-by: Aidan Stewart <astewart@tektelic.com>
> ---
>  drivers/tty/serial/serial_base_bus.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/tty/serial/serial_base_bus.c b/drivers/tty/serial/serial_base_bus.c
> index 5d1677f1b651..0e4bf7a3e775 100644
> --- a/drivers/tty/serial/serial_base_bus.c
> +++ b/drivers/tty/serial/serial_base_bus.c
> @@ -73,6 +73,10 @@ static int serial_base_device_init(struct uart_port *port,
>  	dev->bus = &serial_base_bus_type;
>  	dev->release = release;
>  
> +	if (IS_ENABLED(CONFIG_OF)) {
> +		device_set_of_node_from_dev(dev, parent_dev);
> +	}

Did this pass checkpatch.pl?

And why is the if statement needed?

thanks,

greg k-h

  reply	other threads:[~2025-06-17  4:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-16 16:21 [PATCH] serial: core: restore of_node information in sysfs Aidan Stewart
2025-06-17  4:44 ` Greg KH [this message]
2025-06-17 15:46   ` Aidan Stewart
2025-06-17 15:56     ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2025061746-raking-gusto-d1f3@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=astewart@tektelic.com \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.