public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/3] Hidraw: ioctl to expose 'uniq'
@ 2009-09-10 17:40 SephirXV
  2009-09-10 17:51 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: SephirXV @ 2009-09-10 17:40 UTC (permalink / raw)
  To: linux-bluetooth

From: Christopher Olson <sephirxv@gmail.com>

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@gmail.com>

---

--- 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;
        }

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-10 17:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-10 17:40 [PATCH 3/3] Hidraw: ioctl to expose 'uniq' SephirXV
2009-09-10 17:51 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox