Skip to content

Commit 34c5f34

Browse files
Dr. David Alan Gilbertlag-linaro
authored andcommitted
mfd: sm501: Remove unused sm501_find_clock
sm501_find_clock() was added in 2007 as part of commit b6d6454 ("[PATCH] mfd: SM501 core driver") but hasn't been used. Remove it. Signed-off-by: "Dr. David Alan Gilbert" <linux@treblig.org> Link: https://lore.kernel.org/r/20250509173521.49596-1-linux@treblig.org Signed-off-by: Lee Jones <lee@kernel.org>
1 parent 950a3c3 commit 34c5f34

File tree

2 files changed

+0
-46
lines changed

2 files changed

+0
-46
lines changed

drivers/mfd/sm501.c

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -631,49 +631,6 @@ unsigned long sm501_set_clock(struct device *dev,
631631

632632
EXPORT_SYMBOL_GPL(sm501_set_clock);
633633

634-
/* sm501_find_clock
635-
*
636-
* finds the closest available frequency for a given clock
637-
*/
638-
639-
unsigned long sm501_find_clock(struct device *dev,
640-
int clksrc,
641-
unsigned long req_freq)
642-
{
643-
struct sm501_devdata *sm = dev_get_drvdata(dev);
644-
unsigned long sm501_freq; /* the frequency achieveable by the 501 */
645-
struct sm501_clock to;
646-
647-
switch (clksrc) {
648-
case SM501_CLOCK_P2XCLK:
649-
if (sm->rev >= 0xC0) {
650-
/* SM502 -> use the programmable PLL */
651-
sm501_freq = (sm501_calc_pll(2 * req_freq,
652-
&to, 5) / 2);
653-
} else {
654-
sm501_freq = (sm501_select_clock(2 * req_freq,
655-
&to, 5) / 2);
656-
}
657-
break;
658-
659-
case SM501_CLOCK_V2XCLK:
660-
sm501_freq = (sm501_select_clock(2 * req_freq, &to, 3) / 2);
661-
break;
662-
663-
case SM501_CLOCK_MCLK:
664-
case SM501_CLOCK_M1XCLK:
665-
sm501_freq = sm501_select_clock(req_freq, &to, 3);
666-
break;
667-
668-
default:
669-
sm501_freq = 0; /* error */
670-
}
671-
672-
return sm501_freq;
673-
}
674-
675-
EXPORT_SYMBOL_GPL(sm501_find_clock);
676-
677634
static struct sm501_device *to_sm_device(struct platform_device *pdev)
678635
{
679636
return container_of(pdev, struct sm501_device, pdev);

include/linux/sm501.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ extern int sm501_unit_power(struct device *dev,
1212
extern unsigned long sm501_set_clock(struct device *dev,
1313
int clksrc, unsigned long freq);
1414

15-
extern unsigned long sm501_find_clock(struct device *dev,
16-
int clksrc, unsigned long req_freq);
17-
1815
/* sm501_misc_control
1916
*
2017
* Modify the SM501's MISC_CONTROL register

0 commit comments

Comments
 (0)