Lines Matching refs:rdwr_arg
435 struct i2c_rdwr_ioctl_data rdwr_arg; in i2cdev_ioctl() local
438 if (copy_from_user(&rdwr_arg, in i2cdev_ioctl()
440 sizeof(rdwr_arg))) in i2cdev_ioctl()
443 if (!rdwr_arg.msgs || rdwr_arg.nmsgs == 0) in i2cdev_ioctl()
450 if (rdwr_arg.nmsgs > I2C_RDWR_IOCTL_MAX_MSGS) in i2cdev_ioctl()
453 rdwr_pa = memdup_user(rdwr_arg.msgs, in i2cdev_ioctl()
454 rdwr_arg.nmsgs * sizeof(struct i2c_msg)); in i2cdev_ioctl()
458 return i2cdev_ioctl_rdwr(client, rdwr_arg.nmsgs, rdwr_pa); in i2cdev_ioctl()
528 struct i2c_rdwr_ioctl_data32 rdwr_arg; in compat_i2cdev_ioctl() local
533 if (copy_from_user(&rdwr_arg, in compat_i2cdev_ioctl()
535 sizeof(rdwr_arg))) in compat_i2cdev_ioctl()
538 if (!rdwr_arg.msgs || rdwr_arg.nmsgs == 0) in compat_i2cdev_ioctl()
541 if (rdwr_arg.nmsgs > I2C_RDWR_IOCTL_MAX_MSGS) in compat_i2cdev_ioctl()
544 rdwr_pa = kmalloc_array(rdwr_arg.nmsgs, sizeof(struct i2c_msg), in compat_i2cdev_ioctl()
549 p = compat_ptr(rdwr_arg.msgs); in compat_i2cdev_ioctl()
550 for (i = 0; i < rdwr_arg.nmsgs; i++) { in compat_i2cdev_ioctl()
564 return i2cdev_ioctl_rdwr(client, rdwr_arg.nmsgs, rdwr_pa); in compat_i2cdev_ioctl()