aboutsummaryrefslogtreecommitdiff
path: root/drivers/pci/controller/pcie-microchip-host.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2023-08-29 11:03:56 -0500
committerBjorn Helgaas <bhelgaas@google.com>2023-08-29 11:03:56 -0500
commit6cef12635821c3d12b6b038b6e5e926917a3dca3 (patch)
tree5956fd2b4054b273eeb1434df96cc4c5b40a48b6 /drivers/pci/controller/pcie-microchip-host.c
parent663544b5697e8c8a815f3ace8e49d62716d653b8 (diff)
parented3cac7c5ac6e7f284100995b80a0a60770c990c (diff)
Merge branch 'pci/controller/remove-void-cast'
- Add stubs for devm action functions that call clk_disable_unprepare() to avoid casts between incompatible function types (Krzysztof WilczyƄski) * pci/controller/remove-void-cast: PCI: microchip: Remove cast between incompatible function type PCI: keembay: Remove cast between incompatible function type PCI: meson: Remove cast between incompatible function type
Diffstat (limited to 'drivers/pci/controller/pcie-microchip-host.c')
-rw-r--r--drivers/pci/controller/pcie-microchip-host.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/pci/controller/pcie-microchip-host.c b/drivers/pci/controller/pcie-microchip-host.c
index 252aff180ca2..137fb8570ba2 100644
--- a/drivers/pci/controller/pcie-microchip-host.c
+++ b/drivers/pci/controller/pcie-microchip-host.c
@@ -847,6 +847,13 @@ static const struct irq_domain_ops event_domain_ops = {
.map = mc_pcie_event_map,
};
+static inline void mc_pcie_deinit_clk(void *data)
+{
+ struct clk *clk = data;
+
+ clk_disable_unprepare(clk);
+}
+
static inline struct clk *mc_pcie_init_clk(struct device *dev, const char *id)
{
struct clk *clk;
@@ -862,8 +869,7 @@ static inline struct clk *mc_pcie_init_clk(struct device *dev, const char *id)
if (ret)
return ERR_PTR(ret);
- devm_add_action_or_reset(dev, (void (*) (void *))clk_disable_unprepare,
- clk);
+ devm_add_action_or_reset(dev, mc_pcie_deinit_clk, clk);
return clk;
}