Skip to content

Commit c209847

Browse files
minimaxwellkuba-moo
authored andcommitted
net: ethernet: fs_enet: Make the per clock optional
Some platforms that use fs_enet don't have the PER register clock. This optional dependency on the clock was incorrectly made mandatory when switching to devm_ accessors. Reported-by: Christophe JAILLET <[email protected]> Closes: https://lore.kernel.org/netdev/[email protected]/ Fixes: c614acf ("net: ethernet: fs_enet: simplify clock handling with devm accessors") Signed-off-by: Maxime Chevallier <[email protected]> Reviewed-by: Christophe JAILLET <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 3254ce8 commit c209847

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ static int fs_enet_probe(struct platform_device *ofdev)
895895
* but require enable to succeed when a clock was specified/found,
896896
* keep a reference to the clock upon successful acquisition
897897
*/
898-
clk = devm_clk_get_enabled(&ofdev->dev, "per");
898+
clk = devm_clk_get_optional_enabled(&ofdev->dev, "per");
899899
if (IS_ERR(clk))
900900
goto out_free_fpi;
901901

0 commit comments

Comments
 (0)