aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/fpga/zynqmp-fpga.c
diff options
context:
space:
mode:
authorUwe Kleine-König <[email protected]>2023-03-02 09:12:51 +0000
committerGreg Kroah-Hartman <[email protected]>2023-03-09 16:31:53 +0000
commit9263271a61fcb07b8a30379e785391415d10aa72 (patch)
treead5a651e499ccb62dd58c73e086a162589a74c9a /drivers/fpga/zynqmp-fpga.c
parentfpga: bridge: fix kernel-doc parameter description (diff)
downloadkernel-9263271a61fcb07b8a30379e785391415d10aa72.tar.gz
kernel-9263271a61fcb07b8a30379e785391415d10aa72.zip
misc: sram: Improve and simplify clk handling
The current code tries to get an associated clk, ignores any errors in the process and if there is a clock enables it unconditionally for the whole lifetime of the sram device. Instead use an "optional" variant of devm_clk_get() which handles the case where no clk is needed for the sram device and do proper error handling for the remaining error cases. Also use an "enabled" variant of devm_clk_get() to simplify. With that .probe() is the only function using struct sram_dev::clk, so it can be replaced by a local variable. Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Philipp Zabel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/fpga/zynqmp-fpga.c')
0 files changed, 0 insertions, 0 deletions