mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
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
This commit is contained in:
@@ -163,6 +163,13 @@ static int meson_pcie_reset(struct meson_pcie *mp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void meson_pcie_disable_clock(void *data)
|
||||
{
|
||||
struct clk *clk = data;
|
||||
|
||||
clk_disable_unprepare(clk);
|
||||
}
|
||||
|
||||
static inline struct clk *meson_pcie_probe_clock(struct device *dev,
|
||||
const char *id, u64 rate)
|
||||
{
|
||||
@@ -187,9 +194,7 @@ static inline struct clk *meson_pcie_probe_clock(struct device *dev,
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
devm_add_action_or_reset(dev,
|
||||
(void (*) (void *))clk_disable_unprepare,
|
||||
clk);
|
||||
devm_add_action_or_reset(dev, meson_pcie_disable_clock, clk);
|
||||
|
||||
return clk;
|
||||
}
|
||||
|
||||
@@ -148,6 +148,13 @@ static const struct dw_pcie_ops keembay_pcie_ops = {
|
||||
.stop_link = keembay_pcie_stop_link,
|
||||
};
|
||||
|
||||
static inline void keembay_pcie_disable_clock(void *data)
|
||||
{
|
||||
struct clk *clk = data;
|
||||
|
||||
clk_disable_unprepare(clk);
|
||||
}
|
||||
|
||||
static inline struct clk *keembay_pcie_probe_clock(struct device *dev,
|
||||
const char *id, u64 rate)
|
||||
{
|
||||
@@ -168,9 +175,7 @@ static inline struct clk *keembay_pcie_probe_clock(struct device *dev,
|
||||
if (ret)
|
||||
return ERR_PTR(ret);
|
||||
|
||||
ret = devm_add_action_or_reset(dev,
|
||||
(void(*)(void *))clk_disable_unprepare,
|
||||
clk);
|
||||
ret = devm_add_action_or_reset(dev, keembay_pcie_disable_clock, clk);
|
||||
if (ret)
|
||||
return ERR_PTR(ret);
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user