Commit 4dcd7384 authored by Jonathan Cameron's avatar Jonathan Cameron

iio:dac:ad5592r: Move exports into IIO_AD5592R namespace

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>
Cc: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: default avatarPaul Cercueil <paul@crapouillou.net>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220130205701.334592-7-jic23@kernel.org
parent 0a1b56b7
...@@ -660,7 +660,7 @@ int ad5592r_probe(struct device *dev, const char *name, ...@@ -660,7 +660,7 @@ int ad5592r_probe(struct device *dev, const char *name,
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(ad5592r_probe); EXPORT_SYMBOL_NS_GPL(ad5592r_probe, IIO_AD5592R);
void ad5592r_remove(struct device *dev) void ad5592r_remove(struct device *dev)
{ {
...@@ -674,7 +674,7 @@ void ad5592r_remove(struct device *dev) ...@@ -674,7 +674,7 @@ void ad5592r_remove(struct device *dev)
if (st->reg) if (st->reg)
regulator_disable(st->reg); regulator_disable(st->reg);
} }
EXPORT_SYMBOL_GPL(ad5592r_remove); EXPORT_SYMBOL_NS_GPL(ad5592r_remove, IIO_AD5592R);
MODULE_AUTHOR("Paul Cercueil <paul.cercueil@analog.com>"); MODULE_AUTHOR("Paul Cercueil <paul.cercueil@analog.com>");
MODULE_DESCRIPTION("Analog Devices AD5592R multi-channel converters"); MODULE_DESCRIPTION("Analog Devices AD5592R multi-channel converters");
......
...@@ -170,3 +170,4 @@ module_spi_driver(ad5592r_spi_driver); ...@@ -170,3 +170,4 @@ module_spi_driver(ad5592r_spi_driver);
MODULE_AUTHOR("Paul Cercueil <paul.cercueil@analog.com>"); MODULE_AUTHOR("Paul Cercueil <paul.cercueil@analog.com>");
MODULE_DESCRIPTION("Analog Devices AD5592R multi-channel converters"); MODULE_DESCRIPTION("Analog Devices AD5592R multi-channel converters");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS(IIO_AD5592R);
...@@ -137,3 +137,4 @@ module_i2c_driver(ad5593r_driver); ...@@ -137,3 +137,4 @@ module_i2c_driver(ad5593r_driver);
MODULE_AUTHOR("Paul Cercueil <paul.cercueil@analog.com>"); MODULE_AUTHOR("Paul Cercueil <paul.cercueil@analog.com>");
MODULE_DESCRIPTION("Analog Devices AD5593R multi-channel converters"); MODULE_DESCRIPTION("Analog Devices AD5593R multi-channel converters");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS(IIO_AD5592R);
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