On Thu, 2021-12-30 at 19:33 +0000, Jonathan Cameron wrote: > From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> > > 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: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> > Cc: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx> > --- > drivers/iio/accel/bmc150-accel-core.c | 8 ++++---- > drivers/iio/accel/bmc150-accel-i2c.c | 1 + > drivers/iio/accel/bmc150-accel-spi.c | 1 + > 3 files changed, 6 insertions(+), 4 deletions(-) > > diff --git a/drivers/iio/accel/bmc150-accel-core.c > b/drivers/iio/accel/bmc150-accel-core.c > index e6081dd0a880..711928d626c5 100644 > --- a/drivers/iio/accel/bmc150-accel-core.c > +++ b/drivers/iio/accel/bmc150-accel-core.c > @@ -203,7 +203,7 @@ const struct regmap_config bmc150_regmap_conf = { > .val_bits = 8, > .max_register = 0x3f, > }; > -EXPORT_SYMBOL_GPL(bmc150_regmap_conf); > +EXPORT_SYMBOL_NS_GPL(bmc150_regmap_conf, BMC150); > > static int bmc150_accel_set_mode(struct bmc150_accel_data *data, > enum bmc150_power_modes mode, > @@ -1798,7 +1798,7 @@ int bmc150_accel_core_probe(struct device *dev, > struct regmap *regmap, int irq, > > return ret; > } > -EXPORT_SYMBOL_GPL(bmc150_accel_core_probe); > +EXPORT_SYMBOL_NS_GPL(bmc150_accel_core_probe, BMC150); > > void bmc150_accel_core_remove(struct device *dev) > { > @@ -1821,7 +1821,7 @@ void bmc150_accel_core_remove(struct device *dev) > regulator_bulk_disable(ARRAY_SIZE(data->regulators), > data->regulators); > } > -EXPORT_SYMBOL_GPL(bmc150_accel_core_remove); > +EXPORT_SYMBOL_NS_GPL(bmc150_accel_core_remove, BMC150); > > #ifdef CONFIG_PM_SLEEP > static int bmc150_accel_suspend(struct device *dev) > @@ -1896,7 +1896,7 @@ const struct dev_pm_ops bmc150_accel_pm_ops = { > SET_RUNTIME_PM_OPS(bmc150_accel_runtime_suspend, > bmc150_accel_runtime_resume, NULL) > }; > -EXPORT_SYMBOL_GPL(bmc150_accel_pm_ops); > +EXPORT_SYMBOL_NS_GPL(bmc150_accel_pm_ops, BMC150); > > MODULE_AUTHOR("Srinivas Pandruvada < > srinivas.pandruvada@xxxxxxxxxxxxxxx>"); > MODULE_LICENSE("GPL v2"); > diff --git a/drivers/iio/accel/bmc150-accel-i2c.c > b/drivers/iio/accel/bmc150-accel-i2c.c > index 9e52df9a8f07..e5d10e7be332 100644 > --- a/drivers/iio/accel/bmc150-accel-i2c.c > +++ b/drivers/iio/accel/bmc150-accel-i2c.c > @@ -280,3 +280,4 @@ module_i2c_driver(bmc150_accel_driver); > MODULE_AUTHOR("Srinivas Pandruvada < > srinivas.pandruvada@xxxxxxxxxxxxxxx>"); > MODULE_LICENSE("GPL v2"); > MODULE_DESCRIPTION("BMC150 I2C accelerometer driver"); > +MODULE_IMPORT_NS(BMC150); > diff --git a/drivers/iio/accel/bmc150-accel-spi.c > b/drivers/iio/accel/bmc150-accel-spi.c > index 11559567cb39..e6d05f3625b7 100644 > --- a/drivers/iio/accel/bmc150-accel-spi.c > +++ b/drivers/iio/accel/bmc150-accel-spi.c > @@ -84,3 +84,4 @@ module_spi_driver(bmc150_accel_driver); > MODULE_AUTHOR("Markus Pargmann <mpa@xxxxxxxxxxxxxx>"); > MODULE_LICENSE("GPL v2"); > MODULE_DESCRIPTION("BMC150 SPI accelerometer driver"); > +MODULE_IMPORT_NS(BMC150);