summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/serdev.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/serdev.c b/common/serdev.c
index 4a6dbef..3e0da08 100644
--- a/common/serdev.c
+++ b/common/serdev.c
@@ -9,6 +9,10 @@ static void serdev_device_poller(void *context)
unsigned char *buf = serdev->buf;
int ret, len;
+ if (serdev->locked)
+ return;
+
+ serdev->locked = true;
/*
* Since this callback is a part of poller infrastructure we
* want to use _non_interruptible version of the function
@@ -37,6 +41,8 @@ static void serdev_device_poller(void *context)
} else {
poller_async_cancel(&serdev->poller);
}
+
+ serdev->locked = false;
}
static int serdev_device_set_polling_interval(struct param_d *param, void *serdev)