summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-npcm-pspi.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* spi: npcm: Modify pspi send functionTomer Maimon2018-12-061-6/+14
| | | | | | | | Align pspi send function code with the recieve function code, Also simplify the code a bit with early return. Signed-off-by: Tomer Maimon <tmaimon77@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: npcm: Fix uninitialized variable warningOlof Johansson2018-11-271-7/+15
| | | | | | | | | | | | The compiler has no way to know that rsize 1 or 2 are the only valid values. Also simplify the code a bit with early return. The warning was: drivers/spi/spi-npcm-pspi.c:215:6: warning: 'val' may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: npcm: Fix an error code in the probe functionDan Carpenter2018-11-231-1/+1
| | | | | | | | | There is an IS_ERR() vs PTR_ERR() typo here. The current code returns 1 but we want to return the negative error code. Fixes: 2a22f1b30cee ("spi: npcm: add NPCM PSPI controller driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: npcm: fix platform_no_drv_owner.cocci warningskbuild test robot2018-11-151-1/+0
| | | | | | | | | | | | | drivers/spi/spi-npcm-pspi.c:470:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Fixes: 2a22f1b30cee ("spi: npcm: add NPCM PSPI controller driver") CC: Tomer Maimon <tmaimon77@gmail.com> Signed-off-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: npcm: fix u32 csgpio being checked for less than zeroColin Ian King2018-11-141-3/+3
| | | | | | | | | | | | | The u32 variable csgpio is being checked for an error return from the call to of_get_named_gpio, however, since this is unsigned this comparison will always be false. Fix this by making csgpio an int and fix up the %u format specifiers to %d accordingly. Detected by CoverityScan, CID#1475476 ("Unsigned compared against 0") Fixes: 2a22f1b30cee ("spi: npcm: add NPCM PSPI controller driver") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: npcm: add NPCM PSPI controller driverTomer Maimon2018-11-131-0/+480
Add Nuvoton NPCM BMC Peripheral SPI controller driver. Signed-off-by: Tomer Maimon <tmaimon77@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>