iio:pressure:mpl115: Move exports into IIO_MPL115 namespace
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 30 Jan 2022 20:56:56 +0000 (20:56 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Fri, 18 Feb 2022 11:42:27 +0000 (11:42 +0000)
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>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220130205701.334592-12-jic23@kernel.org
drivers/iio/pressure/mpl115.c
drivers/iio/pressure/mpl115_i2c.c
drivers/iio/pressure/mpl115_spi.c

index 81f288312a28ded53b3ee5cca0534854df83fdfc..5bf5b9abe6f1a4e6161da0978fdf92ebf545ee96 100644 (file)
@@ -187,7 +187,7 @@ int mpl115_probe(struct device *dev, const char *name,
 
        return devm_iio_device_register(dev, indio_dev);
 }
-EXPORT_SYMBOL_GPL(mpl115_probe);
+EXPORT_SYMBOL_NS_GPL(mpl115_probe, IIO_MPL115);
 
 MODULE_AUTHOR("Peter Meerwald <pmeerw@pmeerw.net>");
 MODULE_DESCRIPTION("Freescale MPL115 pressure/temperature driver");
index ac1f12bcb65e9f9da21f8fd179198badaed97503..099ab1c6832c5d2b0a4039d7ee720925b497ac33 100644 (file)
@@ -62,3 +62,4 @@ module_i2c_driver(mpl115_i2c_driver);
 MODULE_AUTHOR("Peter Meerwald <pmeerw@pmeerw.net>");
 MODULE_DESCRIPTION("Freescale MPL115A2 pressure/temperature driver");
 MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS(IIO_MPL115);
index 4d064f98f56a18c3f3e92d5d70e5e817bd6be5ba..7feec87e2704ef590000be5c24061f8113d46311 100644 (file)
@@ -101,3 +101,4 @@ module_spi_driver(mpl115_spi_driver);
 MODULE_AUTHOR("Akinobu Mita <akinobu.mita@gmail.com>");
 MODULE_DESCRIPTION("Freescale MPL115A1 pressure/temperature driver");
 MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS(IIO_MPL115);