]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/ide/ide-tape.c
Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
[linux.git] / drivers / ide / ide-tape.c
index 3e7482695f77a1e76af0879c8f9a71a3effc9f38..6f26634b22bbec59f0910c2a6aa251bc0d9e0f65 100644 (file)
@@ -1945,11 +1945,22 @@ static int idetape_ioctl(struct block_device *bdev, fmode_t mode,
        return err;
 }
 
+static int idetape_compat_ioctl(struct block_device *bdev, fmode_t mode,
+                               unsigned int cmd, unsigned long arg)
+{
+        if (cmd == 0x0340 || cmd == 0x350)
+               arg = (unsigned long)compat_ptr(arg);
+
+       return idetape_ioctl(bdev, mode, cmd, arg);
+}
+
 static const struct block_device_operations idetape_block_ops = {
        .owner          = THIS_MODULE,
        .open           = idetape_open,
        .release        = idetape_release,
        .ioctl          = idetape_ioctl,
+       .compat_ioctl   = IS_ENABLED(CONFIG_COMPAT) ?
+                               idetape_compat_ioctl : NULL,
 };
 
 static int ide_tape_probe(ide_drive_t *drive)