Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: sm501: Remove unused sm501_find_clock

sm501_find_clock() was added in 2007 as part of
commit b6d6454fdb66 ("[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>

authored by

Dr. David Alan Gilbert and committed by
Lee Jones
34c5f34d 950a3c38

-46
-43
drivers/mfd/sm501.c
··· 631 631 632 632 EXPORT_SYMBOL_GPL(sm501_set_clock); 633 633 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 - 677 634 static struct sm501_device *to_sm_device(struct platform_device *pdev) 678 635 { 679 636 return container_of(pdev, struct sm501_device, pdev);
-3
include/linux/sm501.h
··· 12 12 extern unsigned long sm501_set_clock(struct device *dev, 13 13 int clksrc, unsigned long freq); 14 14 15 - extern unsigned long sm501_find_clock(struct device *dev, 16 - int clksrc, unsigned long req_freq); 17 - 18 15 /* sm501_misc_control 19 16 * 20 17 * Modify the SM501's MISC_CONTROL register