aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc Van Oostenryck <[email protected]>2019-11-20 01:07:41 +0100
committerCorey Minyard <[email protected]>2019-11-22 13:54:55 -0600
commit8e6a5c833333e14a5023a5dcabb64b7d9e046bc6 (patch)
tree68c41781eb51366f9f6e752cef98fc2c6d118863
parent8d73b2aeb8088517b0895f209b68237ea1bc1c02 (diff)
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 <[email protected]> CC: [email protected] CC: Greg Kroah-Hartman <[email protected]> Signed-off-by: Luc Van Oostenryck <[email protected]> Message-Id: <[email protected]> Reviewed-by: Asmaa Mnebhi <[email protected]> Signed-off-by: Corey Minyard <[email protected]>
-rw-r--r--drivers/char/ipmi/ipmb_dev_int.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/ipmi/ipmb_dev_int.c b/drivers/char/ipmi/ipmb_dev_int.c
index ae3bfba27526..1ff4fb1def7c 100644
--- a/drivers/char/ipmi/ipmb_dev_int.c
+++ b/drivers/char/ipmi/ipmb_dev_int.c
@@ -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;