OSDN Git Service

fix pushsw_oms400 and dio_oms400
authoryk700101 <eigyo@bekisys.co.jp>
Sat, 5 Dec 2015 10:34:13 +0000 (19:34 +0900)
committeryk700101 <eigyo@bekisys.co.jp>
Sat, 5 Dec 2015 10:34:13 +0000 (19:34 +0900)
linux-patch-3.2-oms.patch

index 6eea95f..74df14c 100644 (file)
@@ -515,7 +515,7 @@ index 0000000..4c9272b
 + *----------------------------------------------------------------------------*/
 +int dio_init(void);
 +irqreturn_t dio_isr(int irq, void *dev_id, struct pt_regs *regs);
-+static int dio_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg);
++static long dio_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
 +static int dio_open(struct inode *inode, struct file *file);
 +static int dio_release(struct inode *inode, struct file *file);
 +
@@ -564,15 +564,15 @@ index 0000000..4c9272b
 +
 +/*----------------------------------------------------------------------------
 + *----------------------------------------------------------------------------*/
-+static int
-+dio_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
++static long
++dio_ioctl(struct file *file, unsigned int cmd,
 +      unsigned long arg)
 +{
 +      unsigned long   flags;
 +      DEFINE_SPINLOCK(driver_lock);
 +      int val, mask, err;
 +
-+      if (MINOR(inode->i_rdev) != OMS400DIO_MINOR) {
++      if (iminor(file->f_path.dentry->d_inode) != OMS400DIO_MINOR) {
 +              return (-ENODEV);
 +      }
 +
@@ -879,7 +879,7 @@ index 0000000..83ac437
 + *----------------------------------------------------------------------------*/
 +int psw_init(void);
 +irqreturn_t psw_isr(int irq, void *dev_id);
-+static int psw_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg);
++static long psw_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
 +static int psw_open(struct inode *inode, struct file *file);
 +static int psw_release(struct inode *inode, struct file *file);
 +
@@ -926,14 +926,14 @@ index 0000000..83ac437
 +
 +/*----------------------------------------------------------------------------
 + *----------------------------------------------------------------------------*/
-+static int
-+psw_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
++static long
++psw_ioctl(struct file *file, unsigned int cmd,
 +      unsigned long arg)
 +{
 +      unsigned long   flags;
 +      DEFINE_SPINLOCK(driver_lock);
 +
-+      if (MINOR(inode->i_rdev) != PUSHSW_MINOR) {
++      if (iminor(file->f_path.dentry->d_inode) != PUSHSW_MINOR) {
 +              return (-ENODEV);
 +      }
 +
@@ -1178,7 +1178,7 @@ index 0000000..48029bc
 +
 +struct eepromi2c_private eepromi2c_conf[]=
 +{
-+      {0x50, 0x200, 16, 0, NULL, NULL, NULL},
++      {0x50, 0x200, 16, 0, NULL, NULL},
 +};
 +
 +#define MAXEEPROMDEVS (sizeof(eepromi2c_conf)/ sizeof(struct eepromi2c_private))
@@ -1392,7 +1392,7 @@ index 0000000..48029bc
 +      return 0;
 +}
 +
-+static int eepromi2c_ioctl(struct inode *inode, struct file *file,
++static long eepromi2c_ioctl(struct file *file,
 +                         unsigned int cmd, unsigned long arg)
 +{
 +      return -ENOTTY;