From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-kernel@vger.kernel.org
Cc: Lee Jones <lee@kernel.org>
Subject: [PATCH v1 4/5] mfd: intel-lpss: Move exported symbols to INTEL_LPSS namespace
Date: Fri, 24 Nov 2023 21:31:27 +0200 [thread overview]
Message-ID: <20231124200258.3682979-5-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20231124200258.3682979-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/mfd/intel-lpss-acpi.c | 1 +
drivers/mfd/intel-lpss-pci.c | 1 +
drivers/mfd/intel-lpss.c | 10 +++++-----
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/mfd/intel-lpss-acpi.c b/drivers/mfd/intel-lpss-acpi.c
index e4a62cc02cfc..a9e2d9308a01 100644
--- a/drivers/mfd/intel-lpss-acpi.c
+++ b/drivers/mfd/intel-lpss-acpi.c
@@ -223,3 +223,4 @@ MODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>");
MODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>");
MODULE_DESCRIPTION("Intel LPSS ACPI driver");
MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS(INTEL_LPSS);
diff --git a/drivers/mfd/intel-lpss-pci.c b/drivers/mfd/intel-lpss-pci.c
index bc15379afe3b..e1d89423daa6 100644
--- a/drivers/mfd/intel-lpss-pci.c
+++ b/drivers/mfd/intel-lpss-pci.c
@@ -603,3 +603,4 @@ MODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>");
MODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>");
MODULE_DESCRIPTION("Intel LPSS PCI driver");
MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS(INTEL_LPSS);
diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c
index 79ea5e2ad0a6..4a63703b6da5 100644
--- a/drivers/mfd/intel-lpss.c
+++ b/drivers/mfd/intel-lpss.c
@@ -456,7 +456,7 @@ int intel_lpss_probe(struct device *dev,
return ret;
}
-EXPORT_SYMBOL_GPL(intel_lpss_probe);
+EXPORT_SYMBOL_NS_GPL(intel_lpss_probe, INTEL_LPSS);
void intel_lpss_remove(struct device *dev)
{
@@ -468,7 +468,7 @@ void intel_lpss_remove(struct device *dev)
intel_lpss_unregister_clock(lpss);
ida_free(&intel_lpss_devid_ida, lpss->devid);
}
-EXPORT_SYMBOL_GPL(intel_lpss_remove);
+EXPORT_SYMBOL_NS_GPL(intel_lpss_remove, INTEL_LPSS);
#ifdef CONFIG_PM
static int resume_lpss_device(struct device *dev, void *data)
@@ -488,7 +488,7 @@ int intel_lpss_prepare(struct device *dev)
device_for_each_child_reverse(dev, NULL, resume_lpss_device);
return 0;
}
-EXPORT_SYMBOL_GPL(intel_lpss_prepare);
+EXPORT_SYMBOL_NS_GPL(intel_lpss_prepare, INTEL_LPSS);
int intel_lpss_suspend(struct device *dev)
{
@@ -509,7 +509,7 @@ int intel_lpss_suspend(struct device *dev)
return 0;
}
-EXPORT_SYMBOL_GPL(intel_lpss_suspend);
+EXPORT_SYMBOL_NS_GPL(intel_lpss_suspend, INTEL_LPSS);
int intel_lpss_resume(struct device *dev)
{
@@ -524,7 +524,7 @@ int intel_lpss_resume(struct device *dev)
return 0;
}
-EXPORT_SYMBOL_GPL(intel_lpss_resume);
+EXPORT_SYMBOL_NS_GPL(intel_lpss_resume, INTEL_LPSS);
#endif
static int __init intel_lpss_init(void)
--
2.43.0.rc1.1.gbec44491f096
next prev parent reply other threads:[~2023-11-24 20:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-24 19:31 [PATCH v1 0/5] mfd: intel-lpss: Set of cleanups Andy Shevchenko
2023-11-24 19:31 ` [PATCH v1 1/5] mfd: intel-lpss: Revert "Add missing check for platform_get_resource" Andy Shevchenko
2023-11-24 19:31 ` [PATCH v1 2/5] mfd: intel-lpss: Use device_get_match_data() Andy Shevchenko
2023-11-24 19:31 ` [PATCH v1 3/5] mfd: intel-lpss: Adjust header inclusions Andy Shevchenko
2023-11-24 19:31 ` Andy Shevchenko [this message]
2023-11-24 19:31 ` [PATCH v1 5/5] mfd: intel-lpss: Provide Intel LPSS PM ops structure Andy Shevchenko
2023-11-30 14:45 ` [PATCH v1 0/5] mfd: intel-lpss: Set of cleanups Lee Jones
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=20231124200258.3682979-5-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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