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

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 <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20231124200258.3682979-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Andy Shevchenko and committed by
Lee Jones
24ee97a9 a936a917

+7 -5
+1
drivers/mfd/intel-lpss-acpi.c
··· 223 223 MODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>"); 224 224 MODULE_DESCRIPTION("Intel LPSS ACPI driver"); 225 225 MODULE_LICENSE("GPL v2"); 226 + MODULE_IMPORT_NS(INTEL_LPSS);
+1
drivers/mfd/intel-lpss-pci.c
··· 603 603 MODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>"); 604 604 MODULE_DESCRIPTION("Intel LPSS PCI driver"); 605 605 MODULE_LICENSE("GPL v2"); 606 + MODULE_IMPORT_NS(INTEL_LPSS);
+5 -5
drivers/mfd/intel-lpss.c
··· 456 456 457 457 return ret; 458 458 } 459 - EXPORT_SYMBOL_GPL(intel_lpss_probe); 459 + EXPORT_SYMBOL_NS_GPL(intel_lpss_probe, INTEL_LPSS); 460 460 461 461 void intel_lpss_remove(struct device *dev) 462 462 { ··· 468 468 intel_lpss_unregister_clock(lpss); 469 469 ida_free(&intel_lpss_devid_ida, lpss->devid); 470 470 } 471 - EXPORT_SYMBOL_GPL(intel_lpss_remove); 471 + EXPORT_SYMBOL_NS_GPL(intel_lpss_remove, INTEL_LPSS); 472 472 473 473 #ifdef CONFIG_PM 474 474 static int resume_lpss_device(struct device *dev, void *data) ··· 488 488 device_for_each_child_reverse(dev, NULL, resume_lpss_device); 489 489 return 0; 490 490 } 491 - EXPORT_SYMBOL_GPL(intel_lpss_prepare); 491 + EXPORT_SYMBOL_NS_GPL(intel_lpss_prepare, INTEL_LPSS); 492 492 493 493 int intel_lpss_suspend(struct device *dev) 494 494 { ··· 509 509 510 510 return 0; 511 511 } 512 - EXPORT_SYMBOL_GPL(intel_lpss_suspend); 512 + EXPORT_SYMBOL_NS_GPL(intel_lpss_suspend, INTEL_LPSS); 513 513 514 514 int intel_lpss_resume(struct device *dev) 515 515 { ··· 524 524 525 525 return 0; 526 526 } 527 - EXPORT_SYMBOL_GPL(intel_lpss_resume); 527 + EXPORT_SYMBOL_NS_GPL(intel_lpss_resume, INTEL_LPSS); 528 528 #endif 529 529 530 530 static int __init intel_lpss_init(void)