iio:pressure:ms5611: Move exports into IIO_MS5611 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 bus specific device drivers that use them.

For more information see https://lwn.net/Articles/760045/

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Tomasz Duszynski <tduszyns@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220130205701.334592-11-jic23@kernel.org
This commit is contained in:
Jonathan Cameron 2022-01-30 20:56:55 +00:00
parent c8629ec92c
commit 1980d4a1ba
3 changed files with 4 additions and 2 deletions

View File

@ -471,7 +471,7 @@ err_fini:
ms5611_fini(indio_dev);
return ret;
}
EXPORT_SYMBOL(ms5611_probe);
EXPORT_SYMBOL_NS(ms5611_probe, IIO_MS5611);
void ms5611_remove(struct iio_dev *indio_dev)
{
@ -479,7 +479,7 @@ void ms5611_remove(struct iio_dev *indio_dev)
iio_triggered_buffer_cleanup(indio_dev);
ms5611_fini(indio_dev);
}
EXPORT_SYMBOL(ms5611_remove);
EXPORT_SYMBOL_NS(ms5611_remove, IIO_MS5611);
MODULE_AUTHOR("Tomasz Duszynski <tduszyns@gmail.com>");
MODULE_DESCRIPTION("MS5611 core driver");

View File

@ -140,3 +140,4 @@ module_i2c_driver(ms5611_driver);
MODULE_AUTHOR("Tomasz Duszynski <tduszyns@gmail.com>");
MODULE_DESCRIPTION("MS5611 i2c driver");
MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS(IIO_MS5611);

View File

@ -142,3 +142,4 @@ module_spi_driver(ms5611_driver);
MODULE_AUTHOR("Tomasz Duszynski <tduszyns@gmail.com>");
MODULE_DESCRIPTION("MS5611 spi driver");
MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS(IIO_MS5611);