lkml.org 
[lkml]   [2022]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] pwm: Add missing dummy for devm_pwmchip_add()
Date
The PWM subsystem supports compile-testing if CONFIG_PWM is disabled.
However, no dummy is provided for devm_pwmchip_add(), which may lead to
build failures.

Fixes: bcda91bf86c1ff76 ("pwm: Add a device-managed function to add PWM chips")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
include/linux/pwm.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index d70c6e5a839d6902..bba492eea96c5552 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -478,6 +478,11 @@ static inline int pwmchip_remove(struct pwm_chip *chip)
return -EINVAL;
}

+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)
--
2.25.1
\
 
 \ /
  Last update: 2022-10-25 16:09    [W:0.113 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site