]> www.infradead.org Git - users/jedix/linux-maple.git/commit
spi: rockchip: Use dev_{err,warn}_probe() in the probe path
authorDragan Simic <dsimic@manjaro.org>
Sun, 29 Sep 2024 09:21:17 +0000 (11:21 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 8 Oct 2024 17:41:07 +0000 (18:41 +0100)
commite2fc05873905f2ee96b38a116ae86f45fe7d8e49
treede52f7d4f8aac3129c6d1a5fde52d28322851668
parent36e69b160705b65bf136c2fb6a1194447eeb8478
spi: rockchip: Use dev_{err,warn}_probe() in the probe path

Use function dev_err_probe() in the probe path instead of dev_err() where
appropriate, to make the code a bit more uniform and compact.  Use the new
function dev_warn_probe() to improve error handling for the TX and RX DMA
channel requests, which are actually optional, and tweak the logged warnings
a bit to additionally describe their optional nature.

Previously, deferred requests for the TX and RX DMA channels produced no
debug messages, and the final error messages didn't include the error codes,
which are all highly useful when debugging permanently failed DMA channel
requests, such as when the required drivers aren't enabled.

Suggested-by: Hélene Vulquin <oss@helene.moe>
Signed-off-by: Dragan Simic <dsimic@manjaro.org>
Tested-by: Hélène Vulquin <oss@helene.moe>
Link: https://patch.msgid.link/5b6bd142dab3ab93d7039db3e2fdcfea6bee2217.1727601608.git.dsimic@manjaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-rockchip.c