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

iio: imu: bmi160: Move exported symbols to IIO_BMI160 namespace

Avoid unnecessary pollution of the global symbol namespace by
moving library functions in to a specific namespace and import
that into the drivers that make use of the functions.

For more info: https://lwn.net/Articles/760045/Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20220220173701.502331-2-jic23@kernel.orgReviewed-By: default avatarJoe Simmons-Talbott <joetalbott@gmail.com>
Link: https://lore.kernel.org/r/20220604155306.422937-2-jic23@kernel.orgSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 88cb99da
......@@ -143,7 +143,7 @@ const struct regmap_config bmi160_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
};
EXPORT_SYMBOL(bmi160_regmap_config);
EXPORT_SYMBOL_NS(bmi160_regmap_config, IIO_BMI160);
struct bmi160_regs {
u8 data; /* LSB byte register for X-axis */
......@@ -633,7 +633,7 @@ int bmi160_enable_irq(struct regmap *regmap, bool enable)
BMI160_DRDY_INT_EN, enable_bit,
BMI160_NORMAL_WRITE_USLEEP);
}
EXPORT_SYMBOL(bmi160_enable_irq);
EXPORT_SYMBOL_NS(bmi160_enable_irq, IIO_BMI160);
static int bmi160_get_irq(struct fwnode_handle *fwnode, enum bmi160_int_pin *pin)
{
......@@ -884,7 +884,7 @@ int bmi160_core_probe(struct device *dev, struct regmap *regmap,
return devm_iio_device_register(dev, indio_dev);
}
EXPORT_SYMBOL_GPL(bmi160_core_probe);
EXPORT_SYMBOL_NS_GPL(bmi160_core_probe, IIO_BMI160);
MODULE_AUTHOR("Daniel Baluta <daniel.baluta@intel.com>");
MODULE_DESCRIPTION("Bosch BMI160 driver");
......
......@@ -68,3 +68,4 @@ module_i2c_driver(bmi160_i2c_driver);
MODULE_AUTHOR("Daniel Baluta <daniel.baluta@intel.com>");
MODULE_DESCRIPTION("BMI160 I2C driver");
MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS(IIO_BMI160);
......@@ -65,3 +65,4 @@ module_spi_driver(bmi160_spi_driver);
MODULE_AUTHOR("Daniel Baluta <daniel.baluta@intel.com");
MODULE_DESCRIPTION("Bosch BMI160 SPI driver");
MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS(IIO_BMI160);
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