Commit fe2fe330 authored by Jonathan Cameron's avatar Jonathan Cameron

iio:accel:adxl355: Move exports into IIO_ADXL355 namespace

To avoid unnecessary pollution of the global symbol namespace move the
driver core exports into their own namespace and import that into the two
bus modules.

For more info see https://lwn.net/Articles/760045/Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Puranjay Mohan <puranjay12@gmail.com>
Link: https://lore.kernel.org/r/20220116180535.2367780-8-jic23@kernel.org
parent 0a18114d
...@@ -71,7 +71,7 @@ const struct regmap_access_table adxl355_readable_regs_tbl = { ...@@ -71,7 +71,7 @@ const struct regmap_access_table adxl355_readable_regs_tbl = {
.yes_ranges = adxl355_read_reg_range, .yes_ranges = adxl355_read_reg_range,
.n_yes_ranges = ARRAY_SIZE(adxl355_read_reg_range), .n_yes_ranges = ARRAY_SIZE(adxl355_read_reg_range),
}; };
EXPORT_SYMBOL_GPL(adxl355_readable_regs_tbl); EXPORT_SYMBOL_NS_GPL(adxl355_readable_regs_tbl, IIO_ADXL355);
static const struct regmap_range adxl355_write_reg_range[] = { static const struct regmap_range adxl355_write_reg_range[] = {
regmap_reg_range(ADXL355_OFFSET_X_H_REG, ADXL355_RESET_REG), regmap_reg_range(ADXL355_OFFSET_X_H_REG, ADXL355_RESET_REG),
...@@ -81,7 +81,7 @@ const struct regmap_access_table adxl355_writeable_regs_tbl = { ...@@ -81,7 +81,7 @@ const struct regmap_access_table adxl355_writeable_regs_tbl = {
.yes_ranges = adxl355_write_reg_range, .yes_ranges = adxl355_write_reg_range,
.n_yes_ranges = ARRAY_SIZE(adxl355_write_reg_range), .n_yes_ranges = ARRAY_SIZE(adxl355_write_reg_range),
}; };
EXPORT_SYMBOL_GPL(adxl355_writeable_regs_tbl); EXPORT_SYMBOL_NS_GPL(adxl355_writeable_regs_tbl, IIO_ADXL355);
enum adxl355_op_mode { enum adxl355_op_mode {
ADXL355_MEASUREMENT, ADXL355_MEASUREMENT,
...@@ -757,7 +757,7 @@ int adxl355_core_probe(struct device *dev, struct regmap *regmap, ...@@ -757,7 +757,7 @@ int adxl355_core_probe(struct device *dev, struct regmap *regmap,
return devm_iio_device_register(dev, indio_dev); return devm_iio_device_register(dev, indio_dev);
} }
EXPORT_SYMBOL_GPL(adxl355_core_probe); EXPORT_SYMBOL_NS_GPL(adxl355_core_probe, IIO_ADXL355);
MODULE_AUTHOR("Puranjay Mohan <puranjay12@gmail.com>"); MODULE_AUTHOR("Puranjay Mohan <puranjay12@gmail.com>");
MODULE_DESCRIPTION("ADXL355 3-Axis Digital Accelerometer core driver"); MODULE_DESCRIPTION("ADXL355 3-Axis Digital Accelerometer core driver");
......
...@@ -60,3 +60,4 @@ module_i2c_driver(adxl355_i2c_driver); ...@@ -60,3 +60,4 @@ module_i2c_driver(adxl355_i2c_driver);
MODULE_AUTHOR("Puranjay Mohan <puranjay12@gmail.com>"); MODULE_AUTHOR("Puranjay Mohan <puranjay12@gmail.com>");
MODULE_DESCRIPTION("ADXL355 3-Axis Digital Accelerometer I2C driver"); MODULE_DESCRIPTION("ADXL355 3-Axis Digital Accelerometer I2C driver");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS(IIO_ADXL355);
...@@ -63,3 +63,4 @@ module_spi_driver(adxl355_spi_driver); ...@@ -63,3 +63,4 @@ module_spi_driver(adxl355_spi_driver);
MODULE_AUTHOR("Puranjay Mohan <puranjay12@gmail.com>"); MODULE_AUTHOR("Puranjay Mohan <puranjay12@gmail.com>");
MODULE_DESCRIPTION("ADXL355 3-Axis Digital Accelerometer SPI driver"); MODULE_DESCRIPTION("ADXL355 3-Axis Digital Accelerometer SPI driver");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS(IIO_ADXL355);
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