Skip to contentSkip to conversation

tty: use isdigit() in tty_find_polling_driver()

PATCH New Thorsten Blum 2 participants 2 messages Nov 6 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tty: use isdigit() in tty_find_polling_driver()

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

---
 drivers/tty/tty_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/tty_io.c +1 -1
index 1a6c8a1bc764..3575310c72e0 100644
@@ -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;