summaryrefslogtreecommitdiffstats
path: root/drivers/staging/fbtft
diff options
context:
space:
mode:
authorTobin C. Harding <me@tobin.cc>2017-02-15 14:27:24 +1100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-06 09:16:59 +0100
commitdbc364054c2e2c7008129237cdaa558656de104d (patch)
tree2bdc22b2b79376e5980a84df070b6df6b522a594 /drivers/staging/fbtft
parent8414fe11ba2ff2422c4b73bbef3b035a2562c88a (diff)
downloadblackbird-obmc-linux-dbc364054c2e2c7008129237cdaa558656de104d.tar.gz
blackbird-obmc-linux-dbc364054c2e2c7008129237cdaa558656de104d.zip
staging: fbtft: Replace magic number with constant
Current call to strncmp() uses a magic number. There is a compile time constant defined for this buffer, included and used already at other sites in the file. Remove magic number. Replace with pre-existing compile time constant. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fbtft')
-rw-r--r--drivers/staging/fbtft/fbtft_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/fbtft/fbtft_device.c b/drivers/staging/fbtft/fbtft_device.c
index 6b9e8adda984..61b7bfc7d714 100644
--- a/drivers/staging/fbtft/fbtft_device.c
+++ b/drivers/staging/fbtft/fbtft_device.c
@@ -1489,7 +1489,7 @@ static int __init fbtft_device_init(void)
}
for (i = 0; i < ARRAY_SIZE(displays); i++) {
- if (strncmp(name, displays[i].name, 32) == 0) {
+ if (strncmp(name, displays[i].name, SPI_NAME_SIZE) == 0) {
if (displays[i].spi) {
spi = displays[i].spi;
spi->chip_select = cs;
OpenPOWER on IntegriCloud