[PATCH 2/3] staging: fbtft: do not use magic numbers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
---
 drivers/staging/fbtft/fbtft_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fbtft/fbtft_device.c b/drivers/staging/fbtft/fbtft_device.c
index 3856c88..80ab918 100644
--- a/drivers/staging/fbtft/fbtft_device.c
+++ b/drivers/staging/fbtft/fbtft_device.c
@@ -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++)
-- 
1.9.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux