Skip to content

Commit 33c651a

Browse files
Uwe Kleine-KönigUwe Kleine-König
authored andcommitted
pwm: Make use of a symbol namespace for the core
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Uwe Kleine-König <[email protected]>
1 parent 2c69747 commit 33c651a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

drivers/pwm/core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
* Copyright (C) 2011-2012 Avionic Design GmbH
77
*/
88

9+
#define DEFAULT_SYMBOL_NAMESPACE PWM
10+
911
#include <linux/acpi.h>
1012
#include <linux/module.h>
1113
#include <linux/idr.h>

include/linux/pwm.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@
44

55
#include <linux/device.h>
66
#include <linux/err.h>
7+
#include <linux/module.h>
78
#include <linux/mutex.h>
89
#include <linux/of.h>
910

11+
MODULE_IMPORT_NS(PWM);
12+
1013
struct pwm_chip;
1114

1215
/**

0 commit comments

Comments
 (0)