mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
soc: aspeed: Fix snoop_file_poll()'s return type
commita4e55ccd43
upstream. snoop_file_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. Link: https://lore.kernel.org/r/20191121051851.268726-1-joel@jms.id.au Fixes:3772e5da44
("drivers/misc: Aspeed LPC snoop output using misc chardev") Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f255ba7d63
commit
8a43239f46
1 changed files with 2 additions and 2 deletions
|
@ -97,13 +97,13 @@ static ssize_t snoop_file_read(struct file *file, char __user *buffer,
|
|||
return ret ? ret : copied;
|
||||
}
|
||||
|
||||
static unsigned int snoop_file_poll(struct file *file,
|
||||
static __poll_t snoop_file_poll(struct file *file,
|
||||
struct poll_table_struct *pt)
|
||||
{
|
||||
struct aspeed_lpc_snoop_channel *chan = snoop_file_to_chan(file);
|
||||
|
||||
poll_wait(file, &chan->wq, pt);
|
||||
return !kfifo_is_empty(&chan->fifo) ? POLLIN : 0;
|
||||
return !kfifo_is_empty(&chan->fifo) ? EPOLLIN : 0;
|
||||
}
|
||||
|
||||
static const struct file_operations snoop_fops = {
|
||||
|
|
Loading…
Reference in a new issue