Commit 050ee2f1 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Jonathan Cameron

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: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 47d5e30a
...@@ -21,7 +21,7 @@ config IIO_BUFFER ...@@ -21,7 +21,7 @@ config IIO_BUFFER
if IIO_BUFFER if IIO_BUFFER
config IIO_BUFFER_CB config IIO_BUFFER_CB
bool "IIO callback buffer used for push in-kernel interfaces" tristate "IIO callback buffer used for push in-kernel interfaces"
help help
Should be selected by any drivers that do in-kernel push Should be selected by any drivers that do in-kernel push
usage. That is, those where the data is pushed to the consumer. usage. That is, those where the data is pushed to the consumer.
......
...@@ -6,8 +6,8 @@ obj-$(CONFIG_IIO) += industrialio.o ...@@ -6,8 +6,8 @@ obj-$(CONFIG_IIO) += industrialio.o
industrialio-y := industrialio-core.o industrialio-event.o inkern.o industrialio-y := industrialio-core.o industrialio-event.o inkern.o
industrialio-$(CONFIG_IIO_BUFFER) += industrialio-buffer.o industrialio-$(CONFIG_IIO_BUFFER) += industrialio-buffer.o
industrialio-$(CONFIG_IIO_TRIGGER) += industrialio-trigger.o industrialio-$(CONFIG_IIO_TRIGGER) += industrialio-trigger.o
industrialio-$(CONFIG_IIO_BUFFER_CB) += buffer_cb.o
obj-$(CONFIG_IIO_BUFFER_CB) += industrialio-buffer-cb.o
obj-$(CONFIG_IIO_TRIGGERED_BUFFER) += industrialio-triggered-buffer.o obj-$(CONFIG_IIO_TRIGGERED_BUFFER) += industrialio-triggered-buffer.o
obj-$(CONFIG_IIO_KFIFO_BUF) += kfifo_buf.o obj-$(CONFIG_IIO_KFIFO_BUF) += kfifo_buf.o
......
/* The industrial I/O callback buffer
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published by
* the Free Software Foundation.
*/
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/export.h> #include <linux/export.h>
...@@ -124,3 +132,7 @@ struct iio_channel ...@@ -124,3 +132,7 @@ struct iio_channel
return cb_buffer->channels; return cb_buffer->channels;
} }
EXPORT_SYMBOL_GPL(iio_channel_cb_get_channels); EXPORT_SYMBOL_GPL(iio_channel_cb_get_channels);
MODULE_AUTHOR("Jonathan Cameron <jic23@kernel.org>");
MODULE_DESCRIPTION("Industrial I/O callback buffer");
MODULE_LICENSE("GPL");
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