projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb6a2db
)
staging: fbtft: do not use magic numbers
author
Sudip Mukherjee
<
[email protected]
>
Sat, 5 Sep 2015 13:43:44 +0000
(19:13 +0530)
committer
Greg Kroah-Hartman
<
[email protected]
>
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 <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/staging/fbtft/fbtft_device.c
patch
|
blob
|
history
diff --git
a/drivers/staging/fbtft/fbtft_device.c
b/drivers/staging/fbtft/fbtft_device.c
index 3856c8873f63df896790007a3b19f9cc9e44eb28..80ab918999a696bdf556fc2eb3ac7c4cd33ee6d5 100644
(file)
--- 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++)