@@ -14,10 +14,10 @@
//! #include <unistd.h>
//! #include <sys/ioctl.h>
//!
-//! #define RUST_MISC_DEV_FAIL _IO('|', 0)
-//! #define RUST_MISC_DEV_HELLO _IO('|', 0x80)
-//! #define RUST_MISC_DEV_GET_VALUE _IOR('|', 0x81, int)
-//! #define RUST_MISC_DEV_SET_VALUE _IOW('|', 0x82, int)
+//! #define RUST_MISC_DEV_FAIL _IO('|', 0xaf)
+//! #define RUST_MISC_DEV_HELLO _IO('|', 0x90)
+//! #define RUST_MISC_DEV_GET_VALUE _IOR('|', 0x91, int)
+//! #define RUST_MISC_DEV_SET_VALUE _IOW('|', 0x92, int)
//!
//! int main() {
//! int value, new_value;
@@ -110,9 +110,9 @@
uaccess::{UserSlice, UserSliceReader, UserSliceWriter},
};
-const RUST_MISC_DEV_HELLO: u32 = _IO('|' as u32, 0x80);
-const RUST_MISC_DEV_GET_VALUE: u32 = _IOR::<i32>('|' as u32, 0x81);
-const RUST_MISC_DEV_SET_VALUE: u32 = _IOW::<i32>('|' as u32, 0x82);
+const RUST_MISC_DEV_HELLO: u32 = _IO('|' as u32, 0x90);
+const RUST_MISC_DEV_GET_VALUE: u32 = _IOR::<i32>('|' as u32, 0x91);
+const RUST_MISC_DEV_SET_VALUE: u32 = _IOW::<i32>('|' as u32, 0x92);
module! {
type: RustMiscDeviceModule,
Use 0x90 as the IOCTL number base instead of 0x80, thus avoiding using the same IOCTL numbers as the Media Controller. The change is also in line with current IOCTL number documentation. Also use 0xaf, belonging to the samples IOCTL number range, as the unimplemented IOCTL. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> --- samples/rust/rust_misc_device.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)