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

Configure Feed

Select the types of activity you want to include in your feed.

pwm: Make pwm_request_from_chip() private to the core

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>

authored by

Uwe Kleine-König and committed by
Uwe Kleine-König
d6f66e29 40571a5b

+3 -17
+3 -5
drivers/pwm/core.c
··· 396 396 * chip. A negative error code is returned if the index is not valid for the 397 397 * specified PWM chip or if the PWM device cannot be requested. 398 398 */ 399 - struct pwm_device *pwm_request_from_chip(struct pwm_chip *chip, 400 - unsigned int index, 401 - const char *label) 399 + static struct pwm_device *pwm_request_from_chip(struct pwm_chip *chip, 400 + unsigned int index, 401 + const char *label) 402 402 { 403 403 struct pwm_device *pwm; 404 404 int err; ··· 416 416 mutex_unlock(&pwm_lock); 417 417 return pwm; 418 418 } 419 - EXPORT_SYMBOL_GPL(pwm_request_from_chip); 420 - 421 419 422 420 struct pwm_device * 423 421 of_pwm_xlate_with_flags(struct pwm_chip *chip, const struct of_phandle_args *args)
-12
include/linux/pwm.h
··· 410 410 int __devm_pwmchip_add(struct device *dev, struct pwm_chip *chip, struct module *owner); 411 411 #define devm_pwmchip_add(dev, chip) __devm_pwmchip_add(dev, chip, THIS_MODULE) 412 412 413 - struct pwm_device *pwm_request_from_chip(struct pwm_chip *chip, 414 - unsigned int index, 415 - const char *label); 416 - 417 413 struct pwm_device *of_pwm_xlate_with_flags(struct pwm_chip *chip, 418 414 const struct of_phandle_args *args); 419 415 struct pwm_device *of_pwm_single_xlate(struct pwm_chip *chip, ··· 502 506 static inline int devm_pwmchip_add(struct device *dev, struct pwm_chip *chip) 503 507 { 504 508 return -EINVAL; 505 - } 506 - 507 - static inline struct pwm_device *pwm_request_from_chip(struct pwm_chip *chip, 508 - unsigned int index, 509 - const char *label) 510 - { 511 - might_sleep(); 512 - return ERR_PTR(-ENODEV); 513 509 } 514 510 515 511 static inline struct pwm_device *pwm_get(struct device *dev,