gsensor驱动和指南针驱动修改
author熊万军 <xwj@rock-chips.com>
Mon, 15 Aug 2011 09:52:51 +0000 (17:52 +0800)
committer熊万军 <xwj@rock-chips.com>
Mon, 15 Aug 2011 09:52:51 +0000 (17:52 +0800)
drivers/input/gsensor/mma8452.c
drivers/input/magnetometer/ak8975.c [changed mode: 0755->0644]

index 8aade9457583de2ac327c1e7725985e694c00a74..908358e6f7b07a8292661ad70475e7757eab591e 100755 (executable)
@@ -33,7 +33,7 @@
 #include <linux/earlysuspend.h>
 #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;
old mode 100755 (executable)
new mode 100644 (file)
index 9380c9a..4ec62d4
@@ -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 = {