[PATCH 03/27] serial: core: Make device_find_child()'s match function take a const pointer

From: Zijun Hu
Date: Sat Aug 10 2024 - 22:26:04 EST


From: Zijun Hu <quic_zijuhu@xxxxxxxxxxx>

In order to adapt for constified device_find_child(), make
serial_match_port() as its match function take a const pointer.

Signed-off-by: Zijun Hu <quic_zijuhu@xxxxxxxxxxx>
---
drivers/tty/serial/serial_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 9a18d0b95a41..d22a9db8f54e 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -2368,9 +2368,9 @@ struct uart_match {
struct uart_driver *driver;
};

-static int serial_match_port(struct device *dev, void *data)
+static int serial_match_port(struct device *dev, const void *data)
{
- struct uart_match *match = data;
+ const struct uart_match *match = data;
struct tty_driver *tty_drv = match->driver->tty_driver;
dev_t devt = MKDEV(tty_drv->major, tty_drv->minor_start) +
match->port->line;

--
2.34.1