Commit eca7b25b authored by Jonathan Cameron's avatar Jonathan Cameron

iio:accel:mma7455_core: Move exports into IIO_MMA7455 namespace

In order to avoid unnecessary pollution of the global symbol namespace
move the core mma7455 functions into an mma7455 specific namespace and
import that into the two bus modules.

For more information see https://lwn.net/Articles/760045/Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20220116180535.2367780-3-jic23@kernel.org
parent 4205a215
...@@ -238,7 +238,7 @@ const struct regmap_config mma7455_core_regmap = { ...@@ -238,7 +238,7 @@ const struct regmap_config mma7455_core_regmap = {
.val_bits = 8, .val_bits = 8,
.max_register = MMA7455_REG_TW, .max_register = MMA7455_REG_TW,
}; };
EXPORT_SYMBOL_GPL(mma7455_core_regmap); EXPORT_SYMBOL_NS_GPL(mma7455_core_regmap, IIO_MMA7455);
int mma7455_core_probe(struct device *dev, struct regmap *regmap, int mma7455_core_probe(struct device *dev, struct regmap *regmap,
const char *name) const char *name)
...@@ -293,7 +293,7 @@ int mma7455_core_probe(struct device *dev, struct regmap *regmap, ...@@ -293,7 +293,7 @@ int mma7455_core_probe(struct device *dev, struct regmap *regmap,
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(mma7455_core_probe); EXPORT_SYMBOL_NS_GPL(mma7455_core_probe, IIO_MMA7455);
void mma7455_core_remove(struct device *dev) void mma7455_core_remove(struct device *dev)
{ {
...@@ -306,7 +306,7 @@ void mma7455_core_remove(struct device *dev) ...@@ -306,7 +306,7 @@ void mma7455_core_remove(struct device *dev)
regmap_write(mma7455->regmap, MMA7455_REG_MCTL, regmap_write(mma7455->regmap, MMA7455_REG_MCTL,
MMA7455_MCTL_MODE_STANDBY); MMA7455_MCTL_MODE_STANDBY);
} }
EXPORT_SYMBOL_GPL(mma7455_core_remove); EXPORT_SYMBOL_NS_GPL(mma7455_core_remove, IIO_MMA7455);
MODULE_AUTHOR("Joachim Eastwood <manabian@gmail.com>"); MODULE_AUTHOR("Joachim Eastwood <manabian@gmail.com>");
MODULE_DESCRIPTION("Freescale MMA7455L core accelerometer driver"); MODULE_DESCRIPTION("Freescale MMA7455L core accelerometer driver");
......
...@@ -61,3 +61,4 @@ module_i2c_driver(mma7455_i2c_driver); ...@@ -61,3 +61,4 @@ module_i2c_driver(mma7455_i2c_driver);
MODULE_AUTHOR("Joachim Eastwood <manabian@gmail.com>"); MODULE_AUTHOR("Joachim Eastwood <manabian@gmail.com>");
MODULE_DESCRIPTION("Freescale MMA7455L I2C accelerometer driver"); MODULE_DESCRIPTION("Freescale MMA7455L I2C accelerometer driver");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS(IIO_MMA7455);
...@@ -49,3 +49,4 @@ module_spi_driver(mma7455_spi_driver); ...@@ -49,3 +49,4 @@ module_spi_driver(mma7455_spi_driver);
MODULE_AUTHOR("Joachim Eastwood <manabian@gmail.com>"); MODULE_AUTHOR("Joachim Eastwood <manabian@gmail.com>");
MODULE_DESCRIPTION("Freescale MMA7455L SPI accelerometer driver"); MODULE_DESCRIPTION("Freescale MMA7455L SPI accelerometer driver");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS(IIO_MMA7455);
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