diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-05 18:16:23 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-05 18:16:23 -0700 |
commit | c6a677c6f37bb7abc85ba7e3465e82b9f7eb1d91 (patch) | |
tree | 9d0d4bb2e150837297cddc5be7f1b4950e9ab228 /drivers/staging/fbtft/fbtft_device.c | |
parent | e87d51ac61f88ae44fe14b34abe08566032d726b (diff) | |
parent | 11270059e8d0b6f80801fac910c4ef751ca05c4c (diff) | |
download | op-kernel-dev-c6a677c6f37bb7abc85ba7e3465e82b9f7eb1d91.zip op-kernel-dev-c6a677c6f37bb7abc85ba7e3465e82b9f7eb1d91.tar.gz |
Merge tag 'staging-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging/IIO updates from Greg KH:
"Here is the big staging tree update for 4.12-rc1.
It's a big one, adding about 350k new lines of crap^Wcode, mostly all
in a big dump of media drivers from Intel. But there's other new
drivers in here as well, yet-another-wifi driver, new IIO drivers, and
a new crypto accelerator.
We also deleted a bunch of stuff, mostly in patch cleanups, but also
the Android ION code has shrunk a lot, and the Android low memory
killer driver was finally deleted, much to the celebration of the -mm
developers.
All of these have been in linux-next with a few build issues that will
show up when you merge to your tree"
Merge conflicts in the new rtl8723bs driver (due to the wifi changes
this merge window) handled as per linux-next, courtesy of Stephen
Rothwell.
* tag 'staging-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1182 commits)
staging: fsl-mc/dpio: add cpu <--> LE conversion for dpaa2_fd
staging: ks7010: remove line continuations in quoted strings
staging: vt6656: use tabs instead of spaces
staging: android: ion: Fix unnecessary initialization of static variable
staging: media: atomisp: fix range checking on clk_num
staging: media: atomisp: fix misspelled word in comment
staging: media: atomisp: kmap() can't fail
staging: atomisp: remove #ifdef for runtime PM functions
staging: atomisp: satm include directory is gone
atomisp: remove some more unused files
atomisp: remove hmm_load/store/clear indirections
atomisp: kill off mmgr_free
atomisp: clean up the hmm init/cleanup indirections
atomisp: handle allocation calls before init in the hmm layer
staging: fsl-dpaa2/eth: Add maintainer for Ethernet driver
staging: fsl-dpaa2/eth: Add TODO file
staging: fsl-dpaa2/eth: Add trace points
staging: fsl-dpaa2/eth: Add driver specific stats
staging: fsl-dpaa2/eth: Add ethtool support
staging: fsl-dpaa2/eth: Add Freescale DPAA2 Ethernet driver
...
Diffstat (limited to 'drivers/staging/fbtft/fbtft_device.c')
-rw-r--r-- | drivers/staging/fbtft/fbtft_device.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/drivers/staging/fbtft/fbtft_device.c b/drivers/staging/fbtft/fbtft_device.c index 9ffb9ce..0d97473 100644 --- a/drivers/staging/fbtft/fbtft_device.c +++ b/drivers/staging/fbtft/fbtft_device.c @@ -131,7 +131,7 @@ static void adafruit18_green_tab_set_addr_win(struct fbtft_par *par, "D0 00 14 15 13 2C 42 43 4E 09 16 14 18 21\n" \ "D0 00 14 15 13 0B 43 55 53 0C 17 14 23 20" -static s16 cberry28_init_sequence[] = { +static const s16 cberry28_init_sequence[] = { /* turn off sleep mode */ -1, MIPI_DCS_EXIT_SLEEP_MODE, -2, 120, @@ -180,7 +180,7 @@ static s16 cberry28_init_sequence[] = { -3, }; -static s16 hy28b_init_sequence[] = { +static const s16 hy28b_init_sequence[] = { -1, 0x00e7, 0x0010, -1, 0x0000, 0x0001, -1, 0x0001, 0x0100, -1, 0x0002, 0x0700, -1, 0x0003, 0x1030, -1, 0x0004, 0x0000, @@ -211,7 +211,7 @@ static s16 hy28b_init_sequence[] = { "04 1F 4 7 7 0 7 7 6 0\n" \ "0F 00 1 7 4 0 0 0 6 7" -static s16 pitft_init_sequence[] = { +static const s16 pitft_init_sequence[] = { -1, MIPI_DCS_SOFT_RESET, -2, 5, -1, MIPI_DCS_SET_DISPLAY_OFF, @@ -242,7 +242,7 @@ static s16 pitft_init_sequence[] = { -3 }; -static s16 waveshare32b_init_sequence[] = { +static const s16 waveshare32b_init_sequence[] = { -1, 0xCB, 0x39, 0x2C, 0x00, 0x34, 0x02, -1, 0xCF, 0x00, 0xC1, 0x30, -1, 0xE8, 0x85, 0x00, 0x78, @@ -1448,11 +1448,10 @@ static int __init fbtft_device_init(void) if (fbtft_device_param_gpios[0].name[0]) gpio = fbtft_device_param_gpios; - if (verbose > 2) + if (verbose > 2) { pr_spi_devices(); /* print list of registered SPI devices */ - - if (verbose > 2) pr_p_devices(); /* print list of 'fb' platform devices */ + } pr_debug("name='%s', busnum=%d, cs=%d\n", name, busnum, cs); @@ -1483,13 +1482,19 @@ static int __init fbtft_device_init(void) displays[i].pdev->name = name; displays[i].spi = NULL; } else { - strncpy(displays[i].spi->modalias, name, SPI_NAME_SIZE); + size_t len; + + len = strlcpy(displays[i].spi->modalias, name, + SPI_NAME_SIZE); + if (len >= SPI_NAME_SIZE) + pr_warn("modalias (name) truncated to: %s\n", + displays[i].spi->modalias); displays[i].pdev = NULL; } } 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; |