**
*/
-static int idefloppy_get_format_capacities(ide_drive_t *drive, int *arg)
+static int idefloppy_get_format_capacities(ide_drive_t *drive, int __user *arg)
{
idefloppy_pc_t pc;
idefloppy_capacity_header_t *header;
int i, descriptors, blocks, length;
int u_array_size;
int u_index;
- int *argp;
+ int __user *argp;
if (get_user(u_array_size, arg))
return (-EFAULT);
** 0x01 - verify media after format.
*/
-static int idefloppy_begin_format(ide_drive_t *drive, int *arg)
+static int idefloppy_begin_format(ide_drive_t *drive, int __user *arg)
{
int blocks;
int length;
** the dsc bit, and return either 0 or 65536.
*/
-static int idefloppy_get_format_progress(ide_drive_t *drive, int *arg)
+static int idefloppy_get_format_progress(ide_drive_t *drive, int __user *arg)
{
idefloppy_floppy_t *floppy = drive->driver_data;
idefloppy_pc_t pc;
struct block_device *bdev = inode->i_bdev;
ide_drive_t *drive = bdev->bd_disk->private_data;
idefloppy_floppy_t *floppy = drive->driver_data;
+ void __user *argp = (void __user *)arg;
int err = generic_ide_ioctl(bdev, cmd, arg);
int prevent = (arg) ? 1 : 0;
idefloppy_pc_t pc;
case IDEFLOPPY_IOCTL_FORMAT_SUPPORTED:
return 0;
case IDEFLOPPY_IOCTL_FORMAT_GET_CAPACITY:
- return idefloppy_get_format_capacities(drive, (int *)arg);
+ return idefloppy_get_format_capacities(drive, argp);
case IDEFLOPPY_IOCTL_FORMAT_START:
if (!(file->f_mode & 2))
set_bit(IDEFLOPPY_FORMAT_IN_PROGRESS, &floppy->flags);
- err = idefloppy_begin_format(drive, (int *)arg);
+ err = idefloppy_begin_format(drive, argp);
if (err)
clear_bit(IDEFLOPPY_FORMAT_IN_PROGRESS, &floppy->flags);
return err;
** format progress reporting.
*/
case IDEFLOPPY_IOCTL_FORMAT_GET_PROGRESS:
- return idefloppy_get_format_progress(drive, (int *)arg);
+ return idefloppy_get_format_progress(drive, argp);
}
return -EINVAL;
}