From: Jiri Slaby <jirislaby@kernel.org>
To: "Bramwel Barack" <bramwelbarack89@gmail.com>,
"Pali Rohár" <pali@kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"open list:TTY LAYER AND SERIAL DRIVERS"
<linux-kernel@vger.kernel.org>,
"open list:TTY LAYER AND SERIAL DRIVERS"
<linux-serial@vger.kernel.org>
Subject: Re: [PATCH v2] tty: serial: mvebu-uart: use device_get_match_data()
Date: Sun, 1 Nov 2026 07:55:09 +0100 [thread overview]
Message-ID: <0f0cb164-8871-4030-8430-b41dc7dc37c2@kernel.org> (raw)
In-Reply-To: <20261030183332.23834-1-bramwelbarack89@gmail.com>
On 30. 10. 26, 19:33, Bramwel Barack wrote:
> Modernize the driver by replacing the legacy of_match_device() call
> with the modern device_get_match_data() helper API. This cleans up
> the boilerplate code by extracting the match driver data configuration
> directly.
>
> Consequently, drop the explicit inclusions of <linux/of_device.h> and
> <linux/of_platform.h> as they are no longer required by the driver.
> This allows us to also remove a now-redundant forward declaration and
> drop the problematic of_match_ptr() macro wrapper.
...
> diff --git a/drivers/tty/serial/mvebu-uart.c b/drivers/tty/serial/mvebu-uart.c
> index 33ea496c93b2..1e980dd26465 100644
> --- a/drivers/tty/serial/mvebu-uart.c
> +++ b/drivers/tty/serial/mvebu-uart.c
...
> @@ -919,7 +914,7 @@ static int mvebu_uart_probe(struct platform_device *pdev)
> return -ENOMEM;
>
> /* Get controller data depending on the compatible string */
> - mvuart->data = (struct mvebu_uart_driver_data *)match->data;
> + mvuart->data = (struct mvebu_uart_driver_data *)device_get_match_data(&pdev->dev);
Perhaps remove the cast too?
thanks,
--
js
suse labs
prev parent reply other threads:[~2026-11-01 6:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-30 18:33 Bramwel Barack
2026-11-01 6:55 ` Jiri Slaby [this message]
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=0f0cb164-8871-4030-8430-b41dc7dc37c2@kernel.org \
--to=jirislaby@kernel.org \
--cc=bramwelbarack89@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=pali@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®