Commit 2ebc23b3 authored by Jonathan Cameron's avatar Jonathan Cameron

iio:dac:ad5686: Move exports into IIO_AD5686 namespace

Note these are used in the related ad5696-i2c drivers as well as the
more obviously connected ad5686-spi driver.

In order to avoid unnecessary pollution of the global symbol namespace
move the common/library functions into a specific namespace and import
that into the various specific device drivers that use them.

For more information see https://lwn.net/Articles/760045/Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220130205701.334592-8-jic23@kernel.org
parent 4dcd7384
...@@ -137,3 +137,4 @@ module_spi_driver(ad5686_spi_driver); ...@@ -137,3 +137,4 @@ module_spi_driver(ad5686_spi_driver);
MODULE_AUTHOR("Stefan Popa <stefan.popa@analog.com>"); MODULE_AUTHOR("Stefan Popa <stefan.popa@analog.com>");
MODULE_DESCRIPTION("Analog Devices AD5686 and similar multi-channel DACs"); MODULE_DESCRIPTION("Analog Devices AD5686 and similar multi-channel DACs");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS(IIO_AD5686);
...@@ -536,7 +536,7 @@ int ad5686_probe(struct device *dev, ...@@ -536,7 +536,7 @@ int ad5686_probe(struct device *dev,
regulator_disable(st->reg); regulator_disable(st->reg);
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(ad5686_probe); EXPORT_SYMBOL_NS_GPL(ad5686_probe, IIO_AD5686);
void ad5686_remove(struct device *dev) void ad5686_remove(struct device *dev)
{ {
...@@ -547,7 +547,7 @@ void ad5686_remove(struct device *dev) ...@@ -547,7 +547,7 @@ void ad5686_remove(struct device *dev)
if (!IS_ERR(st->reg)) if (!IS_ERR(st->reg))
regulator_disable(st->reg); regulator_disable(st->reg);
} }
EXPORT_SYMBOL_GPL(ad5686_remove); EXPORT_SYMBOL_NS_GPL(ad5686_remove, IIO_AD5686);
MODULE_AUTHOR("Michael Hennerich <michael.hennerich@analog.com>"); MODULE_AUTHOR("Michael Hennerich <michael.hennerich@analog.com>");
MODULE_DESCRIPTION("Analog Devices AD5686/85/84 DAC"); MODULE_DESCRIPTION("Analog Devices AD5686/85/84 DAC");
......
...@@ -125,3 +125,4 @@ module_i2c_driver(ad5686_i2c_driver); ...@@ -125,3 +125,4 @@ module_i2c_driver(ad5686_i2c_driver);
MODULE_AUTHOR("Stefan Popa <stefan.popa@analog.com>"); MODULE_AUTHOR("Stefan Popa <stefan.popa@analog.com>");
MODULE_DESCRIPTION("Analog Devices AD5686 and similar multi-channel DACs"); MODULE_DESCRIPTION("Analog Devices AD5686 and similar multi-channel DACs");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS(IIO_AD5686);
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