]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
pwm: Make pwm_request_from_chip() private to the core
authorUwe Kleine-König <ukleinek@baylibre.com>
Fri, 7 Jun 2024 08:44:17 +0000 (10:44 +0200)
committerUwe Kleine-König <ukleinek@kernel.org>
Wed, 10 Jul 2024 15:52:47 +0000 (17:52 +0200)
The last user of this function outside of core.c is gone, so it can be
made static.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20240607084416.897777-8-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
drivers/pwm/core.c
include/linux/pwm.h

index 604fd9bc8f223f4aa3bdf1ac6ccb137d67496de6..5c1d20985148cd969782d4d5d195dfc0c36da0c0 100644 (file)
@@ -396,9 +396,9 @@ err_get_device:
  * chip. A negative error code is returned if the index is not valid for the
  * specified PWM chip or if the PWM device cannot be requested.
  */
-struct pwm_device *pwm_request_from_chip(struct pwm_chip *chip,
-                                        unsigned int index,
-                                        const char *label)
+static struct pwm_device *pwm_request_from_chip(struct pwm_chip *chip,
+                                               unsigned int index,
+                                               const char *label)
 {
        struct pwm_device *pwm;
        int err;
@@ -416,8 +416,6 @@ struct pwm_device *pwm_request_from_chip(struct pwm_chip *chip,
        mutex_unlock(&pwm_lock);
        return pwm;
 }
-EXPORT_SYMBOL_GPL(pwm_request_from_chip);
-
 
 struct pwm_device *
 of_pwm_xlate_with_flags(struct pwm_chip *chip, const struct of_phandle_args *args)
index 812c550de60c265d479435b3f63253a2a825fb20..2e225f3b42828a03f05baf1fa65770271926ac91 100644 (file)
@@ -410,10 +410,6 @@ void pwmchip_remove(struct pwm_chip *chip);
 int __devm_pwmchip_add(struct device *dev, struct pwm_chip *chip, struct module *owner);
 #define devm_pwmchip_add(dev, chip) __devm_pwmchip_add(dev, chip, THIS_MODULE)
 
-struct pwm_device *pwm_request_from_chip(struct pwm_chip *chip,
-                                        unsigned int index,
-                                        const char *label);
-
 struct pwm_device *of_pwm_xlate_with_flags(struct pwm_chip *chip,
                const struct of_phandle_args *args);
 struct pwm_device *of_pwm_single_xlate(struct pwm_chip *chip,
@@ -508,14 +504,6 @@ static inline int devm_pwmchip_add(struct device *dev, struct pwm_chip *chip)
        return -EINVAL;
 }
 
-static inline struct pwm_device *pwm_request_from_chip(struct pwm_chip *chip,
-                                                      unsigned int index,
-                                                      const char *label)
-{
-       might_sleep();
-       return ERR_PTR(-ENODEV);
-}
-
 static inline struct pwm_device *pwm_get(struct device *dev,
                                         const char *consumer)
 {