From f7d6d8d971bcd05676c2067a33913025f6df463d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 5 Mar 2025 17:02:52 +0000 Subject: [PATCH] Revert "OPP: Add dev_pm_opp_find_freq_exact_indexed()" This reverts commit 7baa59f83ff365bcc9a0dd4f7877a98e62d138e1 which is commit a5893928bb179d67ca1d44a8f66c990480ba541d upstream. It breaks the Android kernel abi and can be brought back in the future in an abi-safe way if it is really needed. Bug: 161946584 Change-Id: I00b677f975738c791bf7074c982a8e215f8054ac Signed-off-by: Greg Kroah-Hartman --- drivers/opp/core.c | 28 ---------------------------- include/linux/pm_opp.h | 11 ----------- 2 files changed, 39 deletions(-) diff --git a/drivers/opp/core.c b/drivers/opp/core.c index 228b0f961c4b..54fadfb01f3b 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -641,34 +641,6 @@ struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev, } EXPORT_SYMBOL_GPL(dev_pm_opp_find_freq_exact); -/** - * dev_pm_opp_find_freq_exact_indexed() - Search for an exact freq for the - * clock corresponding to the index - * @dev: Device for which we do this operation - * @freq: frequency to search for - * @index: Clock index - * @available: true/false - match for available opp - * - * Search for the matching exact OPP for the clock corresponding to the - * specified index from a starting freq for a device. - * - * Return: matching *opp , else returns ERR_PTR in case of error and should be - * handled using IS_ERR. Error return values can be: - * EINVAL: for bad pointer - * ERANGE: no match found for search - * ENODEV: if device not found in list of registered devices - * - * The callers are required to call dev_pm_opp_put() for the returned OPP after - * use. - */ -struct dev_pm_opp * -dev_pm_opp_find_freq_exact_indexed(struct device *dev, unsigned long freq, - u32 index, bool available) -{ - return _find_key_exact(dev, freq, index, available, _read_freq, NULL); -} -EXPORT_SYMBOL_GPL(dev_pm_opp_find_freq_exact_indexed); - static noinline struct dev_pm_opp *_find_freq_ceil(struct opp_table *opp_table, unsigned long *freq) { diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h index efc8f61d6d1e..8594e64777d2 100644 --- a/include/linux/pm_opp.h +++ b/include/linux/pm_opp.h @@ -136,10 +136,6 @@ struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev, unsigned long freq, bool available); -struct dev_pm_opp * -dev_pm_opp_find_freq_exact_indexed(struct device *dev, unsigned long freq, - u32 index, bool available); - struct dev_pm_opp *dev_pm_opp_find_freq_floor(struct device *dev, unsigned long *freq); @@ -285,13 +281,6 @@ static inline struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev, return ERR_PTR(-EOPNOTSUPP); } -static inline struct dev_pm_opp * -dev_pm_opp_find_freq_exact_indexed(struct device *dev, unsigned long freq, - u32 index, bool available) -{ - return ERR_PTR(-EOPNOTSUPP); -} - static inline struct dev_pm_opp *dev_pm_opp_find_freq_floor(struct device *dev, unsigned long *freq) {