]> www.infradead.org Git - users/jedix/linux-maple.git/commit
can: c_can: Use syscon_regmap_lookup_by_phandle_args
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Wed, 12 Feb 2025 20:23:15 +0000 (21:23 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 19 Feb 2025 09:44:21 +0000 (10:44 +0100)
commit9f0f0345d0406cc17a764be4ce56e6c727cdf720
tree2dc1e8b5aa2abef98bebe07dc3271b91f3c2d557
parentab1bc2290fd8311d49b87c29f1eb123fcb581bee
can: c_can: Use syscon_regmap_lookup_by_phandle_args

Use syscon_regmap_lookup_by_phandle_args() which is a wrapper over
syscon_regmap_lookup_by_phandle() combined with getting the syscon
argument.  Except simpler code this annotates within one line that given
phandle has arguments, so grepping for code would be easier.

There is also no real benefit in printing errors on missing syscon
argument, because this is done just too late: runtime check on
static/build-time data.  Dtschema and Devicetree bindings offer the
static/build-time check for this already.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Link: https://patch.msgid.link/20250212-syscon-phandle-args-can-v2-4-ac9a1253396b@linaro.org
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/c_can/c_can_platform.c