summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-sprd-adi.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* spi: sprd: Fix the possible negative value of BIT()Baolin Wang2017-10-251-1/+1
| | | | | | | | | | | When enabling the ADI hardware channels, if the channel id is 31, then we will get one negative value -1 for BIT() macro, which will write incorrect value to register. Fixes: 7e2903cb91df ("spi: Add ADI driver for Spreadtrum platform") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: sprd-adi: fix platform_no_drv_owner.cocci warningsWu Fengguang2017-10-131-1/+0
| | | | | | | | | | | | drivers/spi/spi-sprd-adi.c:409: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: 7e2903cb91df ("spi: Add ADI driver for Spreadtrum platform") Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: sprd-adi: silence an uninitialized variable warningDan Carpenter2017-09-251-1/+1
| | | | | | | | | | | | | | If of_get_property() fails then "size" is uninitialized and it leads to a static checker warning: drivers/spi/spi-sprd-adi.c:288 sprd_adi_hw_init() error: uninitialized symbol 'size'. We can silence the warning by re-arranging the order of these checks. It obviously doesn't affect runtime at all. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: sprd-adi: checking for NULL instead of IS_ERR()Dan Carpenter2017-09-251-2/+2
| | | | | | | | devm_ioremap_resource() returns error pointers, it never returns NULL. Fixes: 7e2903cb91df ("spi: Add ADI driver for Spreadtrum platform") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: Add ADI driver for Spreadtrum platformBaolin Wang2017-09-191-0/+419
This patch adds ADI driver based on SPI framework for Spreadtrum SC9860 platform. Signed-off-by: Baolin Wang <baolin.wang@spreadtrum.com> Signed-off-by: Mark Brown <broonie@kernel.org>