summaryrefslogtreecommitdiff
path: root/drivers/iio/multiplexer
AgeCommit message (Collapse)Author
2017-09-03iio: multiplexer: add NULL check on devm_kzalloc() and devm_kmemdup() return ↵Gustavo A. R. Silva
values Check return values from call to devm_kzalloc() and devm_kmemup() in order to prevent a NULL pointer dereference. This issue was detected using Coccinelle and the following semantic patch: @@ expression x; identifier fld; @@ * x = devm_kzalloc(...); ... when != x == NULL x->fld Fixes: 7ba9df54b091 ("iio: multiplexer: new iio category and iio-mux driver") Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Acked-by: Peter Rosin <peda@axentia.se> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-09-03iio: multiplexer: drop the manual assignment of THIS_MODULEJonathan Cameron
This is now done through some macro magic by the core. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Acked-by: Peter Rosin <peda@axentia.se>
2017-06-03iio: multiplexer: new iio category and iio-mux driverPeter Rosin
When a multiplexer changes how an iio device behaves (for example by feeding different signals to an ADC), this driver can be used to create one virtual iio channel for each multiplexer state. Depends on the generic multiplexer subsystem. Cache any ext_info values from the parent iio channel, creating a private copy of the ext_info attributes for each multiplexer state/channel. Reviewed-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>