staging: fbtft: do not use magic numbers
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Sat, 5 Sep 2015 13:43:44 +0000 (19:13 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:24:53 +0000 (18:24 -0700)
Using magic numbers are not good coding practise. Use
FBTFT_GPIO_NAME_SIZE as defined in the header files.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fbtft/fbtft_device.c

index 3856c8873f63df896790007a3b19f9cc9e44eb28..80ab918999a696bdf556fc2eb3ac7c4cd33ee6d5 100644 (file)
@@ -1375,7 +1375,7 @@ static int __init fbtft_device_init(void)
        }
 
        /* name=list lists all supported displays */
-       if (strncmp(name, "list", 32) == 0) {
+       if (strncmp(name, "list", FBTFT_GPIO_NAME_SIZE) == 0) {
                pr_info(DRVNAME":  Supported displays:\n");
 
                for (i = 0; i < ARRAY_SIZE(displays); i++)