Commit 022e3ad9 authored by Federico Vaga's avatar Federico Vaga

temporary add fallthorugh macro to support old and new kernel

Signed-off-by: Federico Vaga's avatarfederico.vaga@cern.ch <federico.vaga@cern.ch>
parent 096dc883
......@@ -39,6 +39,11 @@
#include <linux/zio-buffer.h>
#include <linux/zio-trigger.h>
/* Temporary to support both very old and new kernels */
#ifndef fallthrough
#define fallthrough do {} while (0)
#endif
ZIO_PARAM_TRIGGER(zloop_trigger);
ZIO_PARAM_BUFFER(zloop_buffer);
......@@ -186,6 +191,7 @@ static int zloop_raw_output(struct zio_cset *cset)
case ZLOOP_CSET_OUT_DATA:
index = ZLOOP_TYPE_READ_DATA;
fallthrough;
case ZLOOP_CSET_OUT_CTRLDATA:
if (index < 0)
index = ZLOOP_TYPE_READ_CTRLDATA;
......
......@@ -764,6 +764,7 @@ static ssize_t zio_store_alarm(struct device *dev,
switch (sscanf(buf, "%i %i", &v1, &v2)) {
case 2:
ctrl->drv_alarms &= (~v2);
fallthrough;
case 1:
ctrl->zio_alarms &= (~v1);
break;
......
......@@ -3,6 +3,11 @@
#include <linux/version.h>
/* Temporary to support both very old and new kernels */
#ifndef fallthrough
#define fallthrough do {} while (0)
#endif
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,34)
#define ZIO_HAS_BINARY_CONTROL 1
#else
......
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