Skip to content

Commit

Permalink
winesync: Reserve a minor device number and ioctl range
Browse files Browse the repository at this point in the history
  • Loading branch information
Zebediah Figura authored and xanmod committed May 30, 2022
1 parent 2946fd9 commit 456414a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Documentation/admin-guide/devices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,9 @@
240 = /dev/userio Serio driver testing device
241 = /dev/vhost-vsock Host kernel driver for virtio vsock
242 = /dev/rfkill Turning off radio transmissions (rfkill)
243 = /dev/winesync Wine synchronization primitive device

243-254 Reserved for local use
244-254 Reserved for local use
255 Reserved for MISC_DYNAMIC_MINOR

11 char Raw keyboard device (Linux/SPARC only)
Expand Down
2 changes: 2 additions & 0 deletions Documentation/userspace-api/ioctl/ioctl-number.rst
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,8 @@ Code Seq# Include File Comments
<mailto:thomas@winischhofer.net>
0xF6 all LTTng Linux Trace Toolkit Next Generation
<mailto:mathieu.desnoyers@efficios.com>
0xF7 00-0F uapi/linux/winesync.h Wine synchronization primitives
<mailto:wine-devel@winehq.org>
0xF8 all arch/x86/include/uapi/asm/amd_hsmp.h AMD HSMP EPYC system management interface driver
<mailto:nchatrad@amd.com>
0xFD all linux/dm-ioctl.h
Expand Down
3 changes: 2 additions & 1 deletion drivers/misc/winesync.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static const struct file_operations winesync_fops = {
};

static struct miscdevice winesync_misc = {
.minor = MISC_DYNAMIC_MINOR,
.minor = WINESYNC_MINOR,
.name = WINESYNC_NAME,
.fops = &winesync_fops,
};
Expand All @@ -62,3 +62,4 @@ MODULE_AUTHOR("Zebediah Figura");
MODULE_DESCRIPTION("Kernel driver for Wine synchronization primitives");
MODULE_LICENSE("GPL");
MODULE_ALIAS("devname:" WINESYNC_NAME);
MODULE_ALIAS_MISCDEV(WINESYNC_MINOR);
1 change: 1 addition & 0 deletions include/linux/miscdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
#define USERIO_MINOR 240
#define VHOST_VSOCK_MINOR 241
#define RFKILL_MINOR 242
#define WINESYNC_MINOR 243
#define MISC_DYNAMIC_MINOR 255

struct device;
Expand Down

0 comments on commit 456414a

Please sign in to comment.