Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213462
b: refs/heads/master
c: 6427a76
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman authored and Greg Kroah-Hartman committed Oct 22, 2010
1 parent 3ee2c71 commit 158625d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 70a9156bad9d9d1476df35dde582b9f411bf5914
refs/heads/master: 6427a7655afd7f07dfa83736defd1d94656c83e5
14 changes: 7 additions & 7 deletions trunk/drivers/uio/uio.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ static unsigned int uio_poll(struct file *filep, poll_table *wait)
struct uio_listener *listener = filep->private_data;
struct uio_device *idev = listener->dev;

if (idev->info->irq == UIO_IRQ_NONE)
if (!idev->info->irq)
return -EIO;

poll_wait(filep, &idev->wait, wait);
Expand All @@ -530,7 +530,7 @@ static ssize_t uio_read(struct file *filep, char __user *buf,
ssize_t retval;
s32 event_count;

if (idev->info->irq == UIO_IRQ_NONE)
if (!idev->info->irq)
return -EIO;

if (count != sizeof(s32))
Expand Down Expand Up @@ -578,7 +578,7 @@ static ssize_t uio_write(struct file *filep, const char __user *buf,
ssize_t retval;
s32 irq_on;

if (idev->info->irq == UIO_IRQ_NONE)
if (!idev->info->irq)
return -EIO;

if (count != sizeof(s32))
Expand Down Expand Up @@ -825,9 +825,9 @@ int __uio_register_device(struct module *owner,

info->uio_dev = idev;

if (idev->info->irq >= 0) {
ret = request_irq(idev->info->irq, uio_interrupt,
idev->info->irq_flags, idev->info->name, idev);
if (info->irq && (info->irq != UIO_IRQ_CUSTOM)) {
ret = request_irq(info->irq, uio_interrupt,
info->irq_flags, info->name, idev);
if (ret)
goto err_request_irq;
}
Expand Down Expand Up @@ -863,7 +863,7 @@ void uio_unregister_device(struct uio_info *info)

uio_free_minor(idev);

if (info->irq >= 0)
if (info->irq && (info->irq != UIO_IRQ_CUSTOM))
free_irq(info->irq, idev);

uio_dev_del_attributes(idev);
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/uio_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ extern void uio_event_notify(struct uio_info *info);

/* defines for uio_info->irq */
#define UIO_IRQ_CUSTOM -1
#define UIO_IRQ_NONE -2
#define UIO_IRQ_NONE 0

/* defines for uio_mem->memtype */
#define UIO_MEM_NONE 0
Expand Down

0 comments on commit 158625d

Please sign in to comment.