mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
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:
parent
ac04a6daa0
commit
25f657f7dd
|
|
@ -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++;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user