[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20250527055648.503884-4-sakari.ailus@linux.intel.com>
Date: Tue, 27 May 2025 08:56:48 +0300
From: Sakari Ailus <sakari.ailus@...ux.intel.com>
To: linux-doc@...r.kernel.org
Cc: Jonathan Corbet <corbet@....net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Madhavan Srinivasan <maddy@...ux.ibm.com>,
Haren Myneni <haren@...ux.ibm.com>,
Bagas Sanjaya <bagasdotme@...il.com>,
Andrew Donnellan <ajd@...ux.ibm.com>,
Michael Ellerman <mpe@...erman.id.au>,
Akshay Gupta <akshay.gupta@....com>,
linux-kernel@...r.kernel.org,
linux-media@...r.kernel.org,
hans@...erkuil.nl,
laurent.pinchart@...asonboard.com,
Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
Lee Jones <lee@...nel.org>
Subject: [PATCH v2 3/3] samples: rust_misc_device: Bump IOCTL numbers
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@...ux.intel.com>
---
samples/rust/rust_misc_device.rs | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/samples/rust/rust_misc_device.rs b/samples/rust/rust_misc_device.rs
index c881fd6dbd08..2bd017d7c7c3 100644
--- a/samples/rust/rust_misc_device.rs
+++ b/samples/rust/rust_misc_device.rs
@@ -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,
--
2.39.5
Powered by blists - more mailing lists