]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
pwm: Make use of a symbol namespace for the core
authorUwe Kleine-König <ukleinek@baylibre.com>
Fri, 7 Jun 2024 16:00:13 +0000 (18:00 +0200)
committerUwe Kleine-König <ukleinek@kernel.org>
Wed, 10 Jul 2024 15:52:47 +0000 (17:52 +0200)
Define all pwm core's symbols in the namespace "PWM". The necessary
module import statement is just added to the main header, this way every
file that knows about the public functions automatically has this
namespace available.

Thanks to Biju Das for pointing out a cut'n'paste failure in my initial
patch.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/20240607160012.1206874-2-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
drivers/pwm/core.c
include/linux/pwm.h

index 18574857641ed979b5c0b979e44e2c0f93cf0ba7..604fd9bc8f223f4aa3bdf1ac6ccb137d67496de6 100644 (file)
@@ -6,6 +6,8 @@
  * Copyright (C) 2011-2012 Avionic Design GmbH
  */
 
+#define DEFAULT_SYMBOL_NAMESPACE PWM
+
 #include <linux/acpi.h>
 #include <linux/module.h>
 #include <linux/idr.h>
index 60b92c2c75ef0b0395a40751cbfd64eb674928fd..812c550de60c265d479435b3f63253a2a825fb20 100644 (file)
@@ -4,9 +4,12 @@
 
 #include <linux/device.h>
 #include <linux/err.h>
+#include <linux/module.h>
 #include <linux/mutex.h>
 #include <linux/of.h>
 
+MODULE_IMPORT_NS(PWM);
+
 struct pwm_chip;
 
 /**