Cleanups and minor fixes to the ADI sc5xx icc driver - #3434
Open
ukleinek wants to merge 7 commits into
Open
Conversation
PTR_ERR(ptr) already returns a negative value if IS_ERR(ptr) is true. An addtional - is wrong and yields a positive return value which is unexpected by the driver core. Fixes: c91c177 ("soc: adi: Add initial support for SC5xx SoCs") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
…source() devm_platform_get_and_ioremap_resource() is just platform_get_resource() + devm_ioremap(). Use it to reduce boiler plate a bit. Also move *base to a scope more narrow. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
A platform driver doesn't need a remove callback and having none is equivalent to having one that does nothing; see platform_remove(). So drop useless function. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Instead of calling of_node_put() in every return path let the compiler do this tedious job to take care of calling of_node_put() when a device_node pointer gets out of scope. While touching these pointers, restrict the scope as is sensible. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
EXPORT_SYMBOL() usually goes directly after the function, ditto for MODULE_DEVICE_TABLE() and module_platform_driver. While improving coding style, also fix spacing in the of match table and drop the trailing comma after the array terminator and fix indention. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Since commit 5ab23c7 ("modpost: Create modalias for builtin modules") MODULE_DEVICE_TABLE() is enough to reference a match table and the data isn't discarded by the linker even when the driver is built-in and CONFIG_OF is disabled. So there is no valid reason to not store the address of that table in the driver struct. Drop the of_match_ptr() accordingly. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Usage of dev_err_probe() is more compact; properly handles -ENOMEM and -EPROBE_DEFER and also emits the error code in the emitted message. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
sipraga
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description
Similar to #3428 this is the result of reading through the sc5xx icc driver.
PR Type
PR Checklist