Skip to content

Commit 24ee97a

Browse files
andy-shevlag-linaro
authored andcommitted
mfd: intel-lpss: Move exported symbols to INTEL_LPSS namespace
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent a936a91 commit 24ee97a

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

drivers/mfd/intel-lpss-acpi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,3 +223,4 @@ MODULE_AUTHOR("Andy Shevchenko <[email protected]>");
223223
MODULE_AUTHOR("Mika Westerberg <[email protected]>");
224224
MODULE_DESCRIPTION("Intel LPSS ACPI driver");
225225
MODULE_LICENSE("GPL v2");
226+
MODULE_IMPORT_NS(INTEL_LPSS);

drivers/mfd/intel-lpss-pci.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,3 +603,4 @@ MODULE_AUTHOR("Andy Shevchenko <[email protected]>");
603603
MODULE_AUTHOR("Mika Westerberg <[email protected]>");
604604
MODULE_DESCRIPTION("Intel LPSS PCI driver");
605605
MODULE_LICENSE("GPL v2");
606+
MODULE_IMPORT_NS(INTEL_LPSS);

drivers/mfd/intel-lpss.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ int intel_lpss_probe(struct device *dev,
456456

457457
return ret;
458458
}
459-
EXPORT_SYMBOL_GPL(intel_lpss_probe);
459+
EXPORT_SYMBOL_NS_GPL(intel_lpss_probe, INTEL_LPSS);
460460

461461
void intel_lpss_remove(struct device *dev)
462462
{
@@ -468,7 +468,7 @@ void intel_lpss_remove(struct device *dev)
468468
intel_lpss_unregister_clock(lpss);
469469
ida_free(&intel_lpss_devid_ida, lpss->devid);
470470
}
471-
EXPORT_SYMBOL_GPL(intel_lpss_remove);
471+
EXPORT_SYMBOL_NS_GPL(intel_lpss_remove, INTEL_LPSS);
472472

473473
#ifdef CONFIG_PM
474474
static int resume_lpss_device(struct device *dev, void *data)
@@ -488,7 +488,7 @@ int intel_lpss_prepare(struct device *dev)
488488
device_for_each_child_reverse(dev, NULL, resume_lpss_device);
489489
return 0;
490490
}
491-
EXPORT_SYMBOL_GPL(intel_lpss_prepare);
491+
EXPORT_SYMBOL_NS_GPL(intel_lpss_prepare, INTEL_LPSS);
492492

493493
int intel_lpss_suspend(struct device *dev)
494494
{
@@ -509,7 +509,7 @@ int intel_lpss_suspend(struct device *dev)
509509

510510
return 0;
511511
}
512-
EXPORT_SYMBOL_GPL(intel_lpss_suspend);
512+
EXPORT_SYMBOL_NS_GPL(intel_lpss_suspend, INTEL_LPSS);
513513

514514
int intel_lpss_resume(struct device *dev)
515515
{
@@ -524,7 +524,7 @@ int intel_lpss_resume(struct device *dev)
524524

525525
return 0;
526526
}
527-
EXPORT_SYMBOL_GPL(intel_lpss_resume);
527+
EXPORT_SYMBOL_NS_GPL(intel_lpss_resume, INTEL_LPSS);
528528
#endif
529529

530530
static int __init intel_lpss_init(void)

0 commit comments

Comments
 (0)