i have started to learn ioctl
i got this example
http://tldp.org/LDP/lkmpg/2.6/html/x892.html
i got total working of ioctal but i am not getting why and where we need to define ioctal for our driver.?
For that example
Instead of calling ioctl(file_desc, IOCTL_SET_MSG, message);
why we can not direct use
device_write(file, message, size, 0);