ipmi: fix ipmb_poll()'s return type

ipmb_poll() is defined as returning 'unsigned int' but the
.poll method is declared as returning '__poll_t', a bitwise type.

Fix this by using the proper return type and using the EPOLL
constants instead of the POLL ones, as required for __poll_t.

CC: Corey Minyard <minyard@acm.org>
CC: openipmi-developer@lists.sourceforge.net
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Message-Id: <20191120000741.30657-1-luc.vanoostenryck@gmail.com>
Reviewed-by: Asmaa Mnebhi <asmaa@mellanox.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
This commit is contained in:
Luc Van Oostenryck 2019-11-20 01:07:41 +01:00 коммит произвёл Corey Minyard
Родитель 8d73b2aeb8
Коммит 8e6a5c8333
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -151,16 +151,16 @@ static ssize_t ipmb_write(struct file *file, const char __user *buf,
return ret ? : count;
}
static unsigned int ipmb_poll(struct file *file, poll_table *wait)
static __poll_t ipmb_poll(struct file *file, poll_table *wait)
{
struct ipmb_dev *ipmb_dev = to_ipmb_dev(file);
unsigned int mask = POLLOUT;
__poll_t mask = EPOLLOUT;
mutex_lock(&ipmb_dev->file_mutex);
poll_wait(file, &ipmb_dev->wait_queue, wait);
if (atomic_read(&ipmb_dev->request_queue_len))
mask |= POLLIN;
mask |= EPOLLIN;
mutex_unlock(&ipmb_dev->file_mutex);
return mask;