Skip to content

Commit 8e6a5c8

Browse files
lucvoocminyard
authored andcommitted
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]>
1 parent 8d73b2a commit 8e6a5c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/char/ipmi/ipmb_dev_int.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,16 +151,16 @@ static ssize_t ipmb_write(struct file *file, const char __user *buf,
151151
return ret ? : count;
152152
}
153153

154-
static unsigned int ipmb_poll(struct file *file, poll_table *wait)
154+
static __poll_t ipmb_poll(struct file *file, poll_table *wait)
155155
{
156156
struct ipmb_dev *ipmb_dev = to_ipmb_dev(file);
157-
unsigned int mask = POLLOUT;
157+
__poll_t mask = EPOLLOUT;
158158

159159
mutex_lock(&ipmb_dev->file_mutex);
160160
poll_wait(file, &ipmb_dev->wait_queue, wait);
161161

162162
if (atomic_read(&ipmb_dev->request_queue_len))
163-
mask |= POLLIN;
163+
mask |= EPOLLIN;
164164
mutex_unlock(&ipmb_dev->file_mutex);
165165

166166
return mask;

0 commit comments

Comments
 (0)