* [PATCH] tty: use isdigit() in tty_find_polling_driver()
@ 2026-11-06 9:01 Thorsten Blum
0 siblings, 0 replies; only message in thread
From: Thorsten Blum @ 2026-11-06 9:01 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby; +Cc: Thorsten Blum, linux-kernel, linux-serial
Use isdigit() to replace the open-coded implementation.
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
drivers/tty/tty_io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 1a6c8a1bc764..3575310c72e0 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -383,7 +383,7 @@ struct tty_driver *tty_find_polling_driver(char *name, int *line)
char *str, *stp;
for (str = name; *str; str++)
- if ((*str >= '0' && *str <= '9') || *str == ',')
+ if (isdigit(*str) || *str == ',')
break;
if (!*str)
return NULL;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-06 9:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-06 9:01 [PATCH] tty: use isdigit() in tty_find_polling_driver() Thorsten Blum
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®