Skip to content

Commit 9a1683d

Browse files
committed
sh: clkfwk: Kill off unused clk_set_rate_ex().
With the refactoring of the SH7722 clock framework some time ago this abstraction has become unecessary. Kill it off before anyone else gets the bright idea to start using it. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
1 parent ed10b49 commit 9a1683d

File tree

4 files changed

+3
-75
lines changed

4 files changed

+3
-75
lines changed

Documentation/DocBook/sh.tmpl

-4
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@
7979
</sect2>
8080
</sect1>
8181
</chapter>
82-
<chapter id="clk">
83-
<title>Clock Framework Extensions</title>
84-
!Iinclude/linux/sh_clk.h
85-
</chapter>
8682
<chapter id="mach">
8783
<title>Machine Specific Interfaces</title>
8884
<sect1 id="dreamcast">

Documentation/sh/clk.txt

-32
This file was deleted.

drivers/sh/clk/core.c

+3-9
Original file line numberDiff line numberDiff line change
@@ -454,20 +454,14 @@ unsigned long clk_get_rate(struct clk *clk)
454454
EXPORT_SYMBOL_GPL(clk_get_rate);
455455

456456
int clk_set_rate(struct clk *clk, unsigned long rate)
457-
{
458-
return clk_set_rate_ex(clk, rate, 0);
459-
}
460-
EXPORT_SYMBOL_GPL(clk_set_rate);
461-
462-
int clk_set_rate_ex(struct clk *clk, unsigned long rate, int algo_id)
463457
{
464458
int ret = -EOPNOTSUPP;
465459
unsigned long flags;
466460

467461
spin_lock_irqsave(&clock_lock, flags);
468462

469463
if (likely(clk->ops && clk->ops->set_rate)) {
470-
ret = clk->ops->set_rate(clk, rate, algo_id);
464+
ret = clk->ops->set_rate(clk, rate, 0);
471465
if (ret != 0)
472466
goto out_unlock;
473467
} else {
@@ -485,7 +479,7 @@ int clk_set_rate_ex(struct clk *clk, unsigned long rate, int algo_id)
485479

486480
return ret;
487481
}
488-
EXPORT_SYMBOL_GPL(clk_set_rate_ex);
482+
EXPORT_SYMBOL_GPL(clk_set_rate);
489483

490484
int clk_set_parent(struct clk *clk, struct clk *parent)
491485
{
@@ -654,7 +648,7 @@ static int clks_sysdev_suspend(struct sys_device *dev, pm_message_t state)
654648
clkp->parent);
655649
if (likely(clkp->ops->set_rate))
656650
clkp->ops->set_rate(clkp,
657-
rate, NO_CHANGE);
651+
rate, 0);
658652
else if (likely(clkp->ops->recalc))
659653
clkp->rate = clkp->ops->recalc(clkp);
660654
}

include/linux/sh_clk.h

-30
Original file line numberDiff line numberDiff line change
@@ -67,36 +67,6 @@ int clk_register(struct clk *);
6767
void clk_unregister(struct clk *);
6868
void clk_enable_init_clocks(void);
6969

70-
/**
71-
* clk_set_rate_ex - set the clock rate for a clock source, with additional parameter
72-
* @clk: clock source
73-
* @rate: desired clock rate in Hz
74-
* @algo_id: algorithm id to be passed down to ops->set_rate
75-
*
76-
* Returns success (0) or negative errno.
77-
*/
78-
int clk_set_rate_ex(struct clk *clk, unsigned long rate, int algo_id);
79-
80-
enum clk_sh_algo_id {
81-
NO_CHANGE = 0,
82-
83-
IUS_N1_N1,
84-
IUS_322,
85-
IUS_522,
86-
IUS_N11,
87-
88-
SB_N1,
89-
90-
SB3_N1,
91-
SB3_32,
92-
SB3_43,
93-
SB3_54,
94-
95-
BP_N1,
96-
97-
IP_N1,
98-
};
99-
10070
struct clk_div_mult_table {
10171
unsigned int *divisors;
10272
unsigned int nr_divisors;

0 commit comments

Comments
 (0)