10/27/2010 5:48 AM
defining devctl() commands
I know that one can define devctl device-control commands using one of the following macros.
__DIOF(class, cmd, data)
__DIOT(class, cmd, data)
__DIOTF(class, cmd, data)
Here, “cmd” is used to uniquely specific devctl device-control commands.
In Linux, equivalent to this “cmd” is “magic number” and there is guideline choosing magic number in Linux
Would anyone please tell me that, are there any rules, restrictions or guidelines that I should consider while
specifying “cmd” value. And, will it cause any problem if devctl device-control commands defined in two drivers
running simultaneously have same “class” and “cmd”?