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

iio: Move callback buffer to its own module

Currently the IIO callback buffer implementation is directly built into the
IIO core module when enabled. Given that the callback buffer module is
standalone functionallity there is really no reason to do this. So move it
to its own module.

Also rename the source to follow the standard IIO module naming convention
as well as add a license notice to the file.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>

authored by

Lars-Peter Clausen and committed by
Jonathan Cameron
050ee2f1 47d5e30a

+14 -2
+1 -1
drivers/iio/Kconfig
··· 21 21 if IIO_BUFFER 22 22 23 23 config IIO_BUFFER_CB 24 - bool "IIO callback buffer used for push in-kernel interfaces" 24 + tristate "IIO callback buffer used for push in-kernel interfaces" 25 25 help 26 26 Should be selected by any drivers that do in-kernel push 27 27 usage. That is, those where the data is pushed to the consumer.
+1 -1
drivers/iio/Makefile
··· 6 6 industrialio-y := industrialio-core.o industrialio-event.o inkern.o 7 7 industrialio-$(CONFIG_IIO_BUFFER) += industrialio-buffer.o 8 8 industrialio-$(CONFIG_IIO_TRIGGER) += industrialio-trigger.o 9 - industrialio-$(CONFIG_IIO_BUFFER_CB) += buffer_cb.o 10 9 10 + obj-$(CONFIG_IIO_BUFFER_CB) += industrialio-buffer-cb.o 11 11 obj-$(CONFIG_IIO_TRIGGERED_BUFFER) += industrialio-triggered-buffer.o 12 12 obj-$(CONFIG_IIO_KFIFO_BUF) += kfifo_buf.o 13 13
+12
drivers/iio/buffer_cb.c drivers/iio/industrialio-buffer-cb.c
··· 1 + /* The industrial I/O callback buffer 2 + * 3 + * This program is free software; you can redistribute it and/or modify it 4 + * under the terms of the GNU General Public License version 2 as published by 5 + * the Free Software Foundation. 6 + */ 7 + 1 8 #include <linux/kernel.h> 9 + #include <linux/module.h> 2 10 #include <linux/slab.h> 3 11 #include <linux/err.h> 4 12 #include <linux/export.h> ··· 132 124 return cb_buffer->channels; 133 125 } 134 126 EXPORT_SYMBOL_GPL(iio_channel_cb_get_channels); 127 + 128 + MODULE_AUTHOR("Jonathan Cameron <jic23@kernel.org>"); 129 + MODULE_DESCRIPTION("Industrial I/O callback buffer"); 130 + MODULE_LICENSE("GPL");