Skip to content

Commit

Permalink
clk: Remove never used devm_of_clk_del_provider()
Browse files Browse the repository at this point in the history
For the entire history of the devm_of_clk_del_provider) existence
(since 2017) 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]>
  • Loading branch information
andy-shev authored and bebarino committed Sep 30, 2022
1 parent fe9d25b commit 1c8934b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 28 deletions.
26 changes: 0 additions & 26 deletions drivers/clk/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -4750,32 +4750,6 @@ void of_clk_del_provider(struct device_node *np)
}
EXPORT_SYMBOL_GPL(of_clk_del_provider);

static int devm_clk_provider_match(struct device *dev, void *res, void *data)
{
struct device_node **np = res;

if (WARN_ON(!np || !*np))
return 0;

return *np == data;
}

/**
* devm_of_clk_del_provider() - Remove clock provider registered using devm
* @dev: Device to whose lifetime the clock provider was bound
*/
void devm_of_clk_del_provider(struct device *dev)
{
int ret;
struct device_node *np = get_clk_provider_node(dev);

ret = devres_release(dev, devm_of_clk_release_provider,
devm_clk_provider_match, np);

WARN_ON(ret);
}
EXPORT_SYMBOL(devm_of_clk_del_provider);

/**
* of_parse_clkspec() - Parse a DT clock specifier for a given device node
* @np: device node to parse clock specifier from
Expand Down
4 changes: 2 additions & 2 deletions include/linux/clk-provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -1454,7 +1454,7 @@ int devm_of_clk_add_hw_provider(struct device *dev,
void *data),
void *data);
void of_clk_del_provider(struct device_node *np);
void devm_of_clk_del_provider(struct device *dev);

struct clk *of_clk_src_simple_get(struct of_phandle_args *clkspec,
void *data);
struct clk_hw *of_clk_hw_simple_get(struct of_phandle_args *clkspec,
Expand Down Expand Up @@ -1491,7 +1491,7 @@ static inline int devm_of_clk_add_hw_provider(struct device *dev,
return 0;
}
static inline void of_clk_del_provider(struct device_node *np) {}
static inline void devm_of_clk_del_provider(struct device *dev) {}

static inline struct clk *of_clk_src_simple_get(
struct of_phandle_args *clkspec, void *data)
{
Expand Down

0 comments on commit 1c8934b

Please sign in to comment.