Commit c24ef124 authored by Jonathan Cameron's avatar Jonathan Cameron

iio:accel:kxsd9: Move exports into IIO_KDSD9 namespace

In order to avoid unnecessary pollution of the global symbol namespace
move the core kxsd9 functions into a kxsd9 specific namespace and import
that into the two bus modules.

For more information see https://lwn.net/Articles/760045/Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20220116180535.2367780-4-jic23@kernel.org
parent eca7b25b
......@@ -65,3 +65,4 @@ module_i2c_driver(kxsd9_i2c_driver);
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("KXSD9 accelerometer I2C interface");
MODULE_IMPORT_NS(IIO_KXSD9);
......@@ -66,3 +66,4 @@ module_spi_driver(kxsd9_spi_driver);
MODULE_AUTHOR("Jonathan Cameron <jic23@kernel.org>");
MODULE_DESCRIPTION("Kionix KXSD9 SPI driver");
MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS(IIO_KXSD9);
......@@ -476,7 +476,7 @@ int kxsd9_common_probe(struct device *dev,
return ret;
}
EXPORT_SYMBOL(kxsd9_common_probe);
EXPORT_SYMBOL_NS(kxsd9_common_probe, IIO_KXSD9);
void kxsd9_common_remove(struct device *dev)
{
......@@ -490,7 +490,7 @@ void kxsd9_common_remove(struct device *dev)
pm_runtime_disable(dev);
kxsd9_power_down(st);
}
EXPORT_SYMBOL(kxsd9_common_remove);
EXPORT_SYMBOL_NS(kxsd9_common_remove, IIO_KXSD9);
#ifdef CONFIG_PM
static int kxsd9_runtime_suspend(struct device *dev)
......@@ -516,7 +516,7 @@ const struct dev_pm_ops kxsd9_dev_pm_ops = {
SET_RUNTIME_PM_OPS(kxsd9_runtime_suspend,
kxsd9_runtime_resume, NULL)
};
EXPORT_SYMBOL(kxsd9_dev_pm_ops);
EXPORT_SYMBOL_NS(kxsd9_dev_pm_ops, IIO_KXSD9);
MODULE_AUTHOR("Jonathan Cameron <jic23@kernel.org>");
MODULE_DESCRIPTION("Kionix KXSD9 driver");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment