modified scull code for 3.x.x
The scull code is the examples that the book, linux device drivers by Jonathan Corbet uses to explain the various concepts of character devices.
Here is the same code modified for 3.x.x kernel versions. The code has been tested in kernel version 3.7.5
Change the following line in scull.h
int scull_ioctl(struct inode *inode struct file *filp,unsigned int cmd, unsigned long arg); to long scull_ioctl(struct file *filp,unsigned int cmd, unsigned long arg);