Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio:dac:ad5686: Move exports into IIO_AD5686 namespace

Note these are used in the related ad5696-i2c drivers as well as the
more obviously connected ad5686-spi driver.

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 various 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-8-jic23@kernel.org

+4 -2
+1
drivers/iio/dac/ad5686-spi.c
··· 137 137 MODULE_AUTHOR("Stefan Popa <stefan.popa@analog.com>"); 138 138 MODULE_DESCRIPTION("Analog Devices AD5686 and similar multi-channel DACs"); 139 139 MODULE_LICENSE("GPL v2"); 140 + MODULE_IMPORT_NS(IIO_AD5686);
+2 -2
drivers/iio/dac/ad5686.c
··· 536 536 regulator_disable(st->reg); 537 537 return ret; 538 538 } 539 - EXPORT_SYMBOL_GPL(ad5686_probe); 539 + EXPORT_SYMBOL_NS_GPL(ad5686_probe, IIO_AD5686); 540 540 541 541 void ad5686_remove(struct device *dev) 542 542 { ··· 547 547 if (!IS_ERR(st->reg)) 548 548 regulator_disable(st->reg); 549 549 } 550 - EXPORT_SYMBOL_GPL(ad5686_remove); 550 + EXPORT_SYMBOL_NS_GPL(ad5686_remove, IIO_AD5686); 551 551 552 552 MODULE_AUTHOR("Michael Hennerich <michael.hennerich@analog.com>"); 553 553 MODULE_DESCRIPTION("Analog Devices AD5686/85/84 DAC");
+1
drivers/iio/dac/ad5696-i2c.c
··· 125 125 MODULE_AUTHOR("Stefan Popa <stefan.popa@analog.com>"); 126 126 MODULE_DESCRIPTION("Analog Devices AD5686 and similar multi-channel DACs"); 127 127 MODULE_LICENSE("GPL v2"); 128 + MODULE_IMPORT_NS(IIO_AD5686);