#include #include #include "epoll2.h" #include "die.h" void set_epoll_descriptor(int fd_epoll, int action, int fd_toadd, int events) { int ret; struct epoll_event ev; memset(&ev, 0, sizeof(ev)); ev.events = events; ev.data.fd = fd_toadd; ret = epoll_ctl(fd_epoll, action, fd_toadd, &ev); if (ret < 0) panic("Cannot add socket for epoll!\n"); } int set_epoll_descriptor2(int fd_epoll, int action, int fd_toadd, int events) { struct epoll_event ev; memset(&ev, 0, sizeof(ev)); ev.events = events; ev.data.fd = fd_toadd; return epoll_ctl(fd_epoll, action, fd_toadd, &ev); } ody>
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuqiang Ju <juruqiang@huawei.com>2016-10-24 16:39:49 +0800
committerWolfram Sang <wsa@the-dreams.de>2016-10-25 11:09:16 +0200
commitae824f00241f495e8d55ebdc0341f3ce61a77da6 (patch)
tree83697d8640def9fbca4c48addc1367ae6b53b5ce
parent07d9a380680d1c0eb51ef87ff2eab5c994949e69 (diff)
i2c: hix5hd2: allow build with ARCH_HISI
This driver should be buildable with ARCH_HISI, because some of other HiSilicon SoCs also use it. Signed-off-by: Ruqiang Ju <juruqiang@huawei.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>