gsensor驱动和指南针驱动修改

This commit is contained in:
熊万军 2011-08-15 17:52:51 +08:00
parent c8b5393747
commit 593f385a7f
2 changed files with 14 additions and 11 deletions

View File

@ -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;

18
drivers/input/magnetometer/ak8975.c Executable file → Normal file
View File

@ -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 = {