summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-sunplus-sp7021.c
AgeCommit message (Collapse)AuthorFilesLines
2023-12-11spi: sunplus-sp7021: switch to use modern nameYang Yingliang1-44/+44
Change legacy name master/slave to modern name host/target or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://msgid.link/r/20231128093031.3707034-9-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-07spi: sunplus-sp7021: Convert to platform remove callback returning voidUwe Kleine-König1-3/+2
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230303172041.2103336-77-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-19spi: remove spin_lock_irq and variable in the irq procressLi-hao Kuo1-6/+0
remove spin_lock_irq spin_unlock_irq and variable in the irq funciton Signed-off-by: Li-hao Kuo <lhjeff911@gmail.com> Link: https://lore.kernel.org/r/f9991d6064d892d22ac7c2dfabe16309e9d03888.1650010304.git.lhjeff911@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-18spi: clean up some inconsistent indentingYang Li1-2/+2
Eliminate the follow smatch warning: drivers/spi/spi-sunplus-sp7021.c:379 sp7021_spi_slave_transfer_one() warn: inconsistent indenting Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Link: https://lore.kernel.org/r/20220217010024.111904-1-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-14spi: Fix warning for Clang build and simplify codeLi-hao Kuo1-29/+9
Clang build fails with spi-sunplus-sp7021.c:405:2: error: variable 'ret' is used uninitialized whenever switch default is taken default: simplify code Restore initializing ret. and add return error at default Fixes: 47e8fe57a66f ("spi: Modify irq request position and modify parameters") Reported-by: Tom Rix <trix@redhat.com> Reported-by: kernel test robot <lkp@intel.com> Reported-by: Nathan Chancellor <nathan@kernel.org> Reported-by: Mark Brown <broonie@kernel.org> Signed-off-by: Li-hao Kuo <lhjeff911@gmail.com> Link: https://lore.kernel.org/r/7d91e6ce29f9a8df2c53a47b4b977664020e237a.1644805060.git.lhjeff911@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-08spi: Modify irq request position and modify parametersLi-hao Kuo1-32/+31
- Change irq request position to the back. - Add temporary varilable and setting (as suggested by Mr. Andy Shevchenko) Fixes: f62ca4e2a863 ("spi: Add spi driver for Sunplus SP7021") Signed-off-by: Li-hao Kuo <lhjeff911@gmail.com> Link: https://lore.kernel.org/r/a94e3b123773fe303221d2bd2e4ce36ffa905a1c.1644198957.git.lhjeff911@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-01-31spi: sp7201: Fix compiler warnings郭力豪1-4/+6
Fix compiler warming for kernel test Fixes: f62ca4e2a863 ("spi: Add spi driver for Sunplus SP7021") Signed-off-by: Li-hao Kuo <lhjeff911@gmail.com> Link: https://lore.kernel.org/r/CAGcXWkzM6wbhNFLbYoijq7iS_76nYVod1ySFEDu-BRgnBokEQA@mail.gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-01-28spi: Fix missing unlock on error in sp7021_spi_master_transfer_one()Yang Yingliang1-0/+1
Add the missing unlock before return from sp7021_spi_master_transfer_one() in the error handling case. Fixes: f62ca4e2a863 ("spi: Add spi driver for Sunplus SP7021") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20220127115815.3148950-1-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-01-25spi: Add spi driver for Sunplus SP7021Li-hao Kuo1-0/+602
Add spi driver for Sunplus SP7021. Signed-off-by: Li-hao Kuo <lhjeff911@gmail.com> Link: https://lore.kernel.org/r/37998e515d561e762ee30d0ac4fca25a948e0c5c.1642494310.git.lhjeff911@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>