Skip to content

Commit 07bdf48

Browse files
andy-shevbebarino
authored andcommitted
clkdev: Remove never used devm_clk_release_clkdev()
For the entire history of the devm_clk_release_clkdev() existence (since 2018) it was never used. Remove it for good. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 1c8934b commit 07bdf48

File tree

2 files changed

+0
-36
lines changed

2 files changed

+0
-36
lines changed

drivers/clk/clkdev.c

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -351,40 +351,6 @@ static void devm_clkdev_release(struct device *dev, void *res)
351351
clkdev_drop(*(struct clk_lookup **)res);
352352
}
353353

354-
static int devm_clk_match_clkdev(struct device *dev, void *res, void *data)
355-
{
356-
struct clk_lookup **l = res;
357-
358-
return *l == data;
359-
}
360-
361-
/**
362-
* devm_clk_release_clkdev - Resource managed clkdev lookup release
363-
* @dev: device this lookup is bound
364-
* @con_id: connection ID string on device
365-
* @dev_id: format string describing device name
366-
*
367-
* Drop the clkdev lookup created with devm_clk_hw_register_clkdev.
368-
* Normally this function will not need to be called and the resource
369-
* management code will ensure that the resource is freed.
370-
*/
371-
void devm_clk_release_clkdev(struct device *dev, const char *con_id,
372-
const char *dev_id)
373-
{
374-
struct clk_lookup *cl;
375-
int rval;
376-
377-
mutex_lock(&clocks_mutex);
378-
cl = clk_find(dev_id, con_id);
379-
mutex_unlock(&clocks_mutex);
380-
381-
WARN_ON(!cl);
382-
rval = devres_release(dev, devm_clkdev_release,
383-
devm_clk_match_clkdev, cl);
384-
WARN_ON(rval);
385-
}
386-
EXPORT_SYMBOL(devm_clk_release_clkdev);
387-
388354
/**
389355
* devm_clk_hw_register_clkdev - managed clk lookup registration for clk_hw
390356
* @dev: device this lookup is bound

include/linux/clkdev.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,4 @@ int clk_hw_register_clkdev(struct clk_hw *, const char *, const char *);
4646

4747
int devm_clk_hw_register_clkdev(struct device *dev, struct clk_hw *hw,
4848
const char *con_id, const char *dev_id);
49-
void devm_clk_release_clkdev(struct device *dev, const char *con_id,
50-
const char *dev_id);
5149
#endif

0 commit comments

Comments
 (0)