[PATCH 3/3] Hidraw: ioctl to expose 'uniq'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Christopher Olson <sephirxv@xxxxxxxxx>

Simple, deterministic way of getting uniq field bound to hidrawN
files. Flame me on this one, so long as I get some feedback I can use.

Signed-off-by: Christopher Olson <sephirxv@xxxxxxxxx>

---

--- drivers/hid/hidraw.c        2009-09-10 10:32:28.000000000 -0500
+++ drivers/hid/hidraw.c.1      2009-09-10 10:32:13.000000000 -0500
@@ -264,6 +264,12 @@ static long hidraw_ioctl(struct file *fi
                                        ret = -EFAULT;
                                break;
                        }
+               case HIDIOCGRAWINFO + 1:        //HIDIOCG_UNIQ
+                       {
+                               if (copy_to_user(user_arg, dev->hid->uniq, 64))
+                                       ret = -EFAULT;
+                               break;
+                       }
                default:
                        ret = -ENOTTY;
        }
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux