#include #include #include "sig.h" void register_signal(int signal, void (*handler)(int)) { sigset_t block_mask; struct sigaction saction; sigfillset(&block_mask); saction.sa_handler = handler; saction.sa_mask = block_mask; saction.sa_flags = SA_RESTART; sigaction(signal, &saction, NULL); } void register_signal_f(int signal, void (*handler)(int), int flags) { sigset_t block_mask; struct sigaction saction; sigfillset(&block_mask); saction.sa_handler = handler; saction.sa_mask = block_mask; saction.sa_flags = flags; sigaction(signal, &saction, NULL); } it' href='http:///git.distanz.ch/cgit.cgi/linux/net-next.git' title='net-next.git Git repository'/>
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPan Bian <bianpan2016@163.com>2016-12-05 19:37:24 +0800
committerJiri Kosina <jkosina@suse.cz>2016-12-09 13:46:29 +0100
commitc60fa555b11b25386b355c141d90cbee361c3eec (patch)
tree144f457fbc9ebfcb02a4c98a4009fd0f3b402d62 /Documentation/devicetree/booting-without-of.txt
parent2ae3986b84e9d325bc92a1efbcf0c6b0f5016b35 (diff)
HID: usbhid: fix improper return value
Function hid_post_reset() should return negative error codes on failures. However, in its implementation, it incorrectly returns 1. This patch fixes the bug, returning proper error codes on failures. Signed-off-by: Pan Bian <bianpan2016@163.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'Documentation/devicetree/booting-without-of.txt')