From: 熊万军 Date: Mon, 15 Aug 2011 09:52:51 +0000 (+0800) Subject: gsensor驱动和指南针驱动修改 X-Git-Tag: firefly_0821_release~9774 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=593f385a7ffa87e41b8fca1d596995a19d6d3d07;p=firefly-linux-kernel-4.4.55.git gsensor驱动和指南针驱动修改 --- diff --git a/drivers/input/gsensor/mma8452.c b/drivers/input/gsensor/mma8452.c index 8aade9457583..908358e6f7b0 100755 --- a/drivers/input/gsensor/mma8452.c +++ b/drivers/input/gsensor/mma8452.c @@ -33,7 +33,7 @@ #include #endif -#if 1 +#if 0 #define mmaprintk(x...) printk(x) #else #define mmaprintk(x...) @@ -457,8 +457,9 @@ static int mma8452_release(struct inode *inode, struct file *file) return 0; } -static int mma8452_ioctl(struct inode *inode, struct file *file, unsigned int cmd, - unsigned long arg) +//static int mma8452_ioctl(struct inode *inode, struct file *file, unsigned int cmd, +// unsigned long arg) +static int mma8452_ioctl( struct file *file, unsigned int cmd,unsigned long arg) { void __user *argp = (void __user *)arg; diff --git a/drivers/input/magnetometer/ak8975.c b/drivers/input/magnetometer/ak8975.c old mode 100755 new mode 100644 index 9380c9ac26d6..4ec62d4bd2ee --- a/drivers/input/magnetometer/ak8975.c +++ b/drivers/input/magnetometer/ak8975.c @@ -404,9 +404,10 @@ static int akm_aot_release(struct inode *inode, struct file *file) return 0; } -static int -akm_aot_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) +//static int +//akm_aot_ioctl(struct inode *inode, struct file *file, +// unsigned int cmd, unsigned long arg) +static int akm_aot_ioctl(struct file *file,unsigned int cmd, unsigned long arg) { void __user *argp = (void __user *)arg; short flag; @@ -495,9 +496,10 @@ static int akmd_release(struct inode *inode, struct file *file) return 0; } -static int -akmd_ioctl(struct inode *inode, struct file *file, unsigned int cmd, - unsigned long arg) +//static int akmd_ioctl(struct inode *inode, struct file *file, unsigned int cmd, +// unsigned long arg) + +static int akmd_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { void __user *argp = (void __user *)arg; AKMDBG("enter %s\n", __func__); @@ -730,14 +732,14 @@ static struct file_operations akmd_fops = { .owner = THIS_MODULE, .open = akmd_open, .release = akmd_release, - .ioctl = akmd_ioctl, + .unlocked_ioctl = akmd_ioctl, }; static struct file_operations akm_aot_fops = { .owner = THIS_MODULE, .open = akm_aot_open, .release = akm_aot_release, - .ioctl = akm_aot_ioctl, + .unlocked_ioctl = akm_aot_ioctl, }; static struct miscdevice akmd_device = {