From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org
Cc: "Thierry Reding" <thierry.reding@gmail.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Subject: [PATCH v1 2/9] pwm: lpss: Move exported symbols to PWM_LPSS namespace
Date: Tue, 6 Sep 2022 22:57:28 +0300 [thread overview]
Message-ID: <20220906195735.87361-2-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20220906195735.87361-1-andriy.shevchenko@linux.intel.com>
Avoid unnecessary pollution of the global symbol namespace by
moving library functions in to a specific namespace and import
that into the drivers that make use of the functions.
For more info: https://lwn.net/Articles/760045/
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/pwm/pwm-lpss-pci.c | 1 +
drivers/pwm/pwm-lpss-platform.c | 1 +
drivers/pwm/pwm-lpss.c | 2 +-
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/pwm/pwm-lpss-pci.c b/drivers/pwm/pwm-lpss-pci.c
index 75b778e839b3..9f2c666b95ec 100644
--- a/drivers/pwm/pwm-lpss-pci.c
+++ b/drivers/pwm/pwm-lpss-pci.c
@@ -92,3 +92,4 @@ module_pci_driver(pwm_lpss_driver_pci);
MODULE_DESCRIPTION("PWM PCI driver for Intel LPSS");
MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS(PWM_LPSS);
diff --git a/drivers/pwm/pwm-lpss-platform.c b/drivers/pwm/pwm-lpss-platform.c
index fcd80cca2f6d..96fde1b2b967 100644
--- a/drivers/pwm/pwm-lpss-platform.c
+++ b/drivers/pwm/pwm-lpss-platform.c
@@ -87,4 +87,5 @@ module_platform_driver(pwm_lpss_driver_platform);
MODULE_DESCRIPTION("PWM platform driver for Intel LPSS");
MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS(PWM_LPSS);
MODULE_ALIAS("platform:pwm-lpss");
diff --git a/drivers/pwm/pwm-lpss.c b/drivers/pwm/pwm-lpss.c
index 36d4e83e6b79..a82a57eb2482 100644
--- a/drivers/pwm/pwm-lpss.c
+++ b/drivers/pwm/pwm-lpss.c
@@ -250,7 +250,7 @@ struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, struct resource *r,
return lpwm;
}
-EXPORT_SYMBOL_GPL(pwm_lpss_probe);
+EXPORT_SYMBOL_NS_GPL(pwm_lpss_probe, PWM_LPSS);
MODULE_DESCRIPTION("PWM driver for Intel LPSS");
MODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>");
--
2.35.1
next prev parent reply other threads:[~2022-09-06 20:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-06 19:57 [PATCH v1 1/9] pwm: lpss: Deduplicate board info data structures Andy Shevchenko
2022-09-06 19:57 ` Andy Shevchenko [this message]
2022-09-07 9:11 ` [PATCH v1 2/9] pwm: lpss: Move exported symbols to PWM_LPSS namespace Uwe Kleine-König
2022-09-07 14:21 ` Andy Shevchenko
2022-09-07 17:00 ` Andy Shevchenko
2022-09-07 17:14 ` Andy Shevchenko
2022-09-06 19:57 ` [PATCH v1 3/9] pwm: lpss: Move resource mapping to the glue drivers Andy Shevchenko
2022-09-06 19:57 ` [PATCH v1 4/9] pwm: lpss: Include headers we are direct user of Andy Shevchenko
2022-09-07 9:13 ` Uwe Kleine-König
2022-09-07 14:23 ` Andy Shevchenko
2022-09-06 19:57 ` [PATCH v1 5/9] pwm: lpss: Use device_get_match_data to get device data Andy Shevchenko
2022-09-06 19:57 ` [PATCH v1 6/9] pwm: lpss: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros Andy Shevchenko
2022-09-06 19:57 ` [PATCH v1 7/9] pwm: lpss: Make use of bits.h macros for all masks Andy Shevchenko
2022-09-06 19:57 ` [PATCH v1 8/9] pwm: lpss: Add a comment to the bypass field Andy Shevchenko
2022-09-06 19:57 ` [PATCH v1 9/9] pwm: lpss: Allow other drivers to enable PWM LPSS Andy Shevchenko
2022-09-07 9:04 ` [PATCH v1 1/9] pwm: lpss: Deduplicate board info data structures Uwe Kleine-König
2022-09-07 14:27 ` Andy Shevchenko
2022-09-08 8:25 ` Uwe Kleine-König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220906195735.87361-2-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=thierry.reding@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox