From: Josua Mayer Date: Thu, 26 Feb 2026 13:21:12 +0000 (+0200) Subject: phy: can-transceiver: drop temporary helper getting optional mux-state X-Git-Tag: v7.1-rc1~157^2~52^2~5 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=d76e0c54ed8405469375177ddc7e4b863b59d0ae;p=thirdparty%2Fkernel%2Flinux.git phy: can-transceiver: drop temporary helper getting optional mux-state Multiplexer subsystem has now added helpers for getting managed optional mux-state. Switch to the new devm_mux_state_get_optional helper. This change is only compile-tested. Acked-by: Vinod Koul Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Signed-off-by: Josua Mayer Signed-off-by: Ulf Hansson --- diff --git a/drivers/phy/phy-can-transceiver.c b/drivers/phy/phy-can-transceiver.c index fcbca9d2bded0..2b52e47f247a2 100644 --- a/drivers/phy/phy-can-transceiver.c +++ b/drivers/phy/phy-can-transceiver.c @@ -126,16 +126,6 @@ static const struct of_device_id can_transceiver_phy_ids[] = { }; MODULE_DEVICE_TABLE(of, can_transceiver_phy_ids); -/* Temporary wrapper until the multiplexer subsystem supports optional muxes */ -static inline struct mux_state * -can_transceiver_phy_mux_state_get_optional(struct device *dev, const char *mux_name) -{ - if (!of_property_present(dev->of_node, "mux-states")) - return NULL; - - return devm_mux_state_get(dev, mux_name); -} - static struct phy *can_transceiver_phy_xlate(struct device *dev, const struct of_phandle_args *args) { @@ -183,7 +173,7 @@ static int can_transceiver_phy_probe(struct platform_device *pdev) priv->num_ch = num_ch; platform_set_drvdata(pdev, priv); - mux_state = can_transceiver_phy_mux_state_get_optional(dev, NULL); + mux_state = devm_mux_state_get_optional(dev, NULL); if (IS_ERR(mux_state)) return PTR_ERR(mux_state);