Skip to content

Commit f9ecc2f

Browse files
ukleinekUwe Kleine-König
authored andcommitted
pwm: Don't export pwm_capture()
There is only a single caller of this function, and that's in drivers/pwm/core.c itself. So don't export the function. Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Uwe Kleine-König <[email protected]>
1 parent 1c3e34b commit f9ecc2f

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

drivers/pwm/core.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,8 @@ EXPORT_SYMBOL_GPL(pwm_adjust_config);
325325
*
326326
* Returns: 0 on success or a negative error code on failure.
327327
*/
328-
int pwm_capture(struct pwm_device *pwm, struct pwm_capture *result,
329-
unsigned long timeout)
328+
static int pwm_capture(struct pwm_device *pwm, struct pwm_capture *result,
329+
unsigned long timeout)
330330
{
331331
if (!pwm || !pwm->chip->ops)
332332
return -EINVAL;
@@ -338,7 +338,6 @@ int pwm_capture(struct pwm_device *pwm, struct pwm_capture *result,
338338

339339
return pwm->chip->ops->capture(pwm->chip, pwm, result, timeout);
340340
}
341-
EXPORT_SYMBOL_GPL(pwm_capture);
342341

343342
static struct pwm_chip *pwmchip_find_by_name(const char *name)
344343
{

include/linux/pwm.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,6 @@ static inline bool pwm_might_sleep(struct pwm_device *pwm)
394394
}
395395

396396
/* PWM provider APIs */
397-
int pwm_capture(struct pwm_device *pwm, struct pwm_capture *result,
398-
unsigned long timeout);
399-
400397
void pwmchip_put(struct pwm_chip *chip);
401398
struct pwm_chip *pwmchip_alloc(struct device *parent, unsigned int npwm, size_t sizeof_priv);
402399
struct pwm_chip *devm_pwmchip_alloc(struct device *parent, unsigned int npwm, size_t sizeof_priv);
@@ -462,13 +459,6 @@ static inline void pwm_disable(struct pwm_device *pwm)
462459
might_sleep();
463460
}
464461

465-
static inline int pwm_capture(struct pwm_device *pwm,
466-
struct pwm_capture *result,
467-
unsigned long timeout)
468-
{
469-
return -EINVAL;
470-
}
471-
472462
static inline void pwmchip_put(struct pwm_chip *chip)
473463
{
474464
}

0 commit comments

Comments
 (0)