Skip to content

Commit 62c0aff

Browse files
andy-shevbebarino
authored andcommitted
clk: Remove never used devm_clk_*unregister()
For the entire history of the devm_clk_*unregister() existence they were used only once (*) in 2015. Remove them. *) The commit 264e3b7 ("clk: s2mps11: Simplify s2mps11_clk_probe unwind paths") exactly supports the point of the change proposed here. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Acked-by: Uwe Kleine-König <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent 8b3d743 commit 62c0aff

File tree

2 files changed

+0
-50
lines changed

2 files changed

+0
-50
lines changed

drivers/clk/clk.c

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -4279,54 +4279,6 @@ int devm_clk_hw_register(struct device *dev, struct clk_hw *hw)
42794279
}
42804280
EXPORT_SYMBOL_GPL(devm_clk_hw_register);
42814281

4282-
static int devm_clk_match(struct device *dev, void *res, void *data)
4283-
{
4284-
struct clk *c = res;
4285-
if (WARN_ON(!c))
4286-
return 0;
4287-
return c == data;
4288-
}
4289-
4290-
static int devm_clk_hw_match(struct device *dev, void *res, void *data)
4291-
{
4292-
struct clk_hw *hw = res;
4293-
4294-
if (WARN_ON(!hw))
4295-
return 0;
4296-
return hw == data;
4297-
}
4298-
4299-
/**
4300-
* devm_clk_unregister - resource managed clk_unregister()
4301-
* @dev: device that is unregistering the clock data
4302-
* @clk: clock to unregister
4303-
*
4304-
* Deallocate a clock allocated with devm_clk_register(). Normally
4305-
* this function will not need to be called and the resource management
4306-
* code will ensure that the resource is freed.
4307-
*/
4308-
void devm_clk_unregister(struct device *dev, struct clk *clk)
4309-
{
4310-
WARN_ON(devres_release(dev, devm_clk_unregister_cb, devm_clk_match, clk));
4311-
}
4312-
EXPORT_SYMBOL_GPL(devm_clk_unregister);
4313-
4314-
/**
4315-
* devm_clk_hw_unregister - resource managed clk_hw_unregister()
4316-
* @dev: device that is unregistering the hardware-specific clock data
4317-
* @hw: link to hardware-specific clock data
4318-
*
4319-
* Unregister a clk_hw registered with devm_clk_hw_register(). Normally
4320-
* this function will not need to be called and the resource management
4321-
* code will ensure that the resource is freed.
4322-
*/
4323-
void devm_clk_hw_unregister(struct device *dev, struct clk_hw *hw)
4324-
{
4325-
WARN_ON(devres_release(dev, devm_clk_hw_unregister_cb, devm_clk_hw_match,
4326-
hw));
4327-
}
4328-
EXPORT_SYMBOL_GPL(devm_clk_hw_unregister);
4329-
43304282
static void devm_clk_release(struct device *dev, void *res)
43314283
{
43324284
clk_put(*(struct clk **)res);

include/linux/clk-provider.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,10 +1176,8 @@ int __must_check devm_clk_hw_register(struct device *dev, struct clk_hw *hw);
11761176
int __must_check of_clk_hw_register(struct device_node *node, struct clk_hw *hw);
11771177

11781178
void clk_unregister(struct clk *clk);
1179-
void devm_clk_unregister(struct device *dev, struct clk *clk);
11801179

11811180
void clk_hw_unregister(struct clk_hw *hw);
1182-
void devm_clk_hw_unregister(struct device *dev, struct clk_hw *hw);
11831181

11841182
/* helper functions */
11851183
const char *__clk_get_name(const struct clk *clk);

0 commit comments

Comments
 (0)