i2c: designware: Move exports to I2C_DW namespaces

Reduce scope of the I²C DesignWare driver exports to I2C_DW namespaces.
This will prevent abuse of the symbols and clean up global namespace.

Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
This commit is contained in:
Andy Shevchenko 2024-08-22 20:58:40 +03:00 committed by Andi Shyti
parent 1bc7bb8930
commit fd57a3325a
5 changed files with 12 additions and 0 deletions

View File

@ -28,6 +28,8 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/units.h> #include <linux/units.h>
#define DEFAULT_SYMBOL_NAMESPACE I2C_DW_COMMON
#include "i2c-designware-core.h" #include "i2c-designware-core.h"
static char *abort_sources[] = { static char *abort_sources[] = {

View File

@ -22,6 +22,8 @@
#include <linux/regmap.h> #include <linux/regmap.h>
#include <linux/reset.h> #include <linux/reset.h>
#define DEFAULT_SYMBOL_NAMESPACE I2C_DW
#include "i2c-designware-core.h" #include "i2c-designware-core.h"
#define AMD_TIMEOUT_MIN_US 25 #define AMD_TIMEOUT_MIN_US 25
@ -1037,3 +1039,4 @@ EXPORT_SYMBOL_GPL(i2c_dw_probe_master);
MODULE_DESCRIPTION("Synopsys DesignWare I2C bus master adapter"); MODULE_DESCRIPTION("Synopsys DesignWare I2C bus master adapter");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_IMPORT_NS(I2C_DW_COMMON);

View File

@ -410,3 +410,5 @@ module_pci_driver(dw_i2c_driver);
MODULE_AUTHOR("Baruch Siach <baruch@tkos.co.il>"); MODULE_AUTHOR("Baruch Siach <baruch@tkos.co.il>");
MODULE_DESCRIPTION("Synopsys DesignWare PCI I2C bus adapter"); MODULE_DESCRIPTION("Synopsys DesignWare PCI I2C bus adapter");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_IMPORT_NS(I2C_DW);
MODULE_IMPORT_NS(I2C_DW_COMMON);

View File

@ -462,3 +462,5 @@ module_exit(dw_i2c_exit_driver);
MODULE_AUTHOR("Baruch Siach <baruch@tkos.co.il>"); MODULE_AUTHOR("Baruch Siach <baruch@tkos.co.il>");
MODULE_DESCRIPTION("Synopsys DesignWare I2C bus adapter"); MODULE_DESCRIPTION("Synopsys DesignWare I2C bus adapter");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_IMPORT_NS(I2C_DW);
MODULE_IMPORT_NS(I2C_DW_COMMON);

View File

@ -16,6 +16,8 @@
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
#include <linux/regmap.h> #include <linux/regmap.h>
#define DEFAULT_SYMBOL_NAMESPACE I2C_DW
#include "i2c-designware-core.h" #include "i2c-designware-core.h"
static void i2c_dw_configure_fifo_slave(struct dw_i2c_dev *dev) static void i2c_dw_configure_fifo_slave(struct dw_i2c_dev *dev)
@ -279,3 +281,4 @@ EXPORT_SYMBOL_GPL(i2c_dw_probe_slave);
MODULE_AUTHOR("Luis Oliveira <lolivei@synopsys.com>"); MODULE_AUTHOR("Luis Oliveira <lolivei@synopsys.com>");
MODULE_DESCRIPTION("Synopsys DesignWare I2C bus slave adapter"); MODULE_DESCRIPTION("Synopsys DesignWare I2C bus slave adapter");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS(I2C_DW_COMMON);