Skip to contentSkip to conversation

drivers: uio: Fix UIO device registration failure

PATCH In review Damian Hobson-Garcia 3 participants 3 messages Mar 26, 2013 – Apr 23, 2013 Userspace I/O (UIO)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: uio: Fix UIO device registration failure

Until recently uio_get_minor() returned 0 for success and
a negative value on failure. This became non-negative for suceess and negative for failure. Restore the original return value spec so that we can successfully initialize UIO devices with a non-zero minor device number.

---
 drivers/uio/uio.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/uio/uio.c +1 -0
index c8b9262..b645c47 100644
@@ -374,6 +374,7 @@ static int uio_get_minor(struct uio_device *idev)
 	retval = idr_alloc(&uio_idr, idev, 0, UIO_MAX_DEVICES, GFP_KERNEL);
 	if (retval >= 0) {
 		idev->minor = retval;
+		retval = 0;
 	} else if (retval == -ENOSPC) {
 		dev_err(idev->dev, "too many uio devices\n");
 		retval = -EINVAL;
Signature · 1 line
1.7.5.4
maintainer
#1 lore raw
Quoted 10 lines · Damian Hobson-Garcia

Until recently uio_get_minor() returned 0 for success and
a negative value on failure. This became non-negative for suceess and negative for failure. Restore the original return value spec so that we can successfully initialize UIO devices with a non-zero minor device number.

---
 drivers/uio/uio.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Hans, don't you have a bunch of uio patches queued up for me? I've been ignoring them, thinking you are collecting them, is this not true?

greg k-h

#2 lore raw
Quoted 7 lines · Greg KH
Quoted 6 lines · Damian Hobson-Garcia

Until recently uio_get_minor() returned 0 for success and
a negative value on failure. This became non-negative for suceess and negative for failure. Restore the original return value spec so that we can successfully initialize UIO devices with a non-zero minor device number.

Quoted 7 lines
Quoted 4 lines
---
 drivers/uio/uio.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Hans, don't you have a bunch of uio patches queued up for me? I've been ignoring them, thinking you are collecting them, is this not true?

Greg, there isn't any response from Hans regarding the UIO patches. Would you be picking them instead?

Signature · 2 lines
With warm regards,
Sachin