summaryrefslogtreecommitdiff
path: root/sound/usb/line6/driver.h
diff options
context:
space:
mode:
authorVasily Khoruzhick <anarsoul@gmail.com>2020-05-02 12:31:19 -0700
committerTakashi Iwai <tiwai@suse.de>2020-05-02 22:31:03 +0200
commit5c2d0de544c39407bf286d33bdcc1fb06a892d8b (patch)
tree98ba931efb431902adb526d13520af14c5bb7932 /sound/usb/line6/driver.h
parent7f0d5053c5a9d23fe5c2d337495a9d79038d267b (diff)
ALSA: line6: hwdep: add support for O_NONBLOCK opening mode
Currently line6 hwdep interface ignores O_NONBLOCK flag when opening device and it renders it somewhat useless when using poll. Check for O_NONBLOCK flag when opening device and don't block read() if it is set. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Link: https://lore.kernel.org/r/20200502193120.79115-2-anarsoul@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/line6/driver.h')
-rw-r--r--sound/usb/line6/driver.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/usb/line6/driver.h b/sound/usb/line6/driver.h
index e5e572ed5f30..1a4e3700c80c 100644
--- a/sound/usb/line6/driver.h
+++ b/sound/usb/line6/driver.h
@@ -163,6 +163,7 @@ struct usb_line6 {
struct mutex read_lock;
wait_queue_head_t wait_queue;
unsigned int active:1;
+ unsigned int nonblock:1;
STRUCT_KFIFO_REC_2(LINE6_BUFSIZE_LISTEN * LINE6_RAW_MESSAGES_MAXCOUNT)
fifo;
} messages;