serial: core: Use isdigit() in uart_parse_options()

Use isdigit() to replace the open-coded implementation.

Signed-off-by: Thorsten Blum <blum@kernel.org>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
Link: https://patch.msgid.link/20261014143034.104950-3-blum@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Thorsten Blum 2026-10-14 16:30:32 +02:00 committed by Greg Kroah-Hartman
parent ac04a6daa0
commit 25f657f7dd

View File

@ -14,6 +14,7 @@
#include <linux/sched/signal.h>
#include <linux/init.h>
#include <linux/console.h>
#include <linux/ctype.h>
#include <linux/gpio/consumer.h>
#include <linux/kernel.h>
#include <linux/of.h>
@ -2219,7 +2220,7 @@ uart_parse_options(const char *options, int *baud, int *parity,
const char *s = options;
*baud = simple_strtoul(s, NULL, 10);
while (*s >= '0' && *s <= '9')
while (isdigit(*s))
s++;
if (*s)
*parity = *s++;