diff mbox series

pwm: Make use of a symbol namespace for the core

Message ID 20240607160012.1206874-2-u.kleine-koenig@baylibre.com
State Accepted
Headers show
Series pwm: Make use of a symbol namespace for the core | expand

Commit Message

Uwe Kleine-König June 7, 2024, 4 p.m. UTC
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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
 drivers/pwm/core.c  | 2 ++
 include/linux/pwm.h | 3 +++
 2 files changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index 18574857641e..604fd9bc8f22 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -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>
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index 60b92c2c75ef..21beb3663623 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -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(USB_STORAGE);
+
 struct pwm_chip;
 
 /**