Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <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>

authored by

Uwe Kleine-König and committed by
Uwe Kleine-König
33c651a3 2c69747c

+5
+2
drivers/pwm/core.c
··· 6 6 * Copyright (C) 2011-2012 Avionic Design GmbH 7 7 */ 8 8 9 + #define DEFAULT_SYMBOL_NAMESPACE PWM 10 + 9 11 #include <linux/acpi.h> 10 12 #include <linux/module.h> 11 13 #include <linux/idr.h>
+3
include/linux/pwm.h
··· 4 4 5 5 #include <linux/device.h> 6 6 #include <linux/err.h> 7 + #include <linux/module.h> 7 8 #include <linux/mutex.h> 8 9 #include <linux/of.h> 10 + 11 + MODULE_IMPORT_NS(PWM); 9 12 10 13 struct pwm_chip; 11 14