Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] drivers/video: Replace custom macro with isdigit()

Replace the custom CHAR_IS_NUM() macro with isdigit() from <linux/ctype.h>

Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Acked-by: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Tobias Klauser and committed by
Linus Torvalds
82006d08 6f673d83

+2 -4
+2 -1
drivers/video/pm3fb.c
··· 67 67 #include <linux/init.h> 68 68 #include <linux/pci.h> 69 69 #include <linux/ioport.h> 70 + #include <linux/ctype.h> 70 71 71 72 #include <video/fbcon.h> 72 73 #include <video/fbcon-mfb.h> ··· 2595 2594 { 2596 2595 char *next; 2597 2596 2598 - if (!(CHAR_IS_NUM(options[0]))) { 2597 + if (!(isdigit(options[0]))) { 2599 2598 (*bn) = 0; 2600 2599 return (options); 2601 2600 }
-3
include/video/pm3fb.h
··· 1142 1142 /* do we want accelerated console */ 1143 1143 #define PM3FB_USE_ACCEL 1 1144 1144 1145 - /* useful ? */ 1146 - #define CHAR_IS_NUM(a) ((((a) >= '0') && ((a) <= '9')) ? 1 : 0) 1147 - 1148 1145 /* for driver debugging ONLY */ 1149 1146 /* 0 = assert only, 1 = error, 2 = info, 3+ = verbose */ 1150 1147 /* define PM3FB_MASTER_DEBUG 1 */