wifi: use buildin instand of ko for compatibility
[firefly-linux-kernel-4.4.55.git] / block / scsi_ioctl.c
index 055952e92fbd052790d6813865d05b212f8a26e9..a5ffcc988f0b00441a29f76e63e874892d121350 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/ratelimit.h>
 #include <linux/slab.h>
 #include <linux/times.h>
+#include <linux/uio.h>
 #include <asm/uaccess.h>
 
 #include <scsi/scsi.h>
@@ -566,7 +567,7 @@ int scsi_cmd_ioctl(struct request_queue *q, struct gendisk *bd_disk, fmode_t mod
 {
        int err;
 
-       if (!q || blk_get_queue(q))
+       if (!q)
                return -ENXIO;
 
        switch (cmd) {
@@ -687,7 +688,6 @@ int scsi_cmd_ioctl(struct request_queue *q, struct gendisk *bd_disk, fmode_t mod
                        err = -ENOTTY;
        }
 
-       blk_put_queue(q);
        return err;
 }
 EXPORT_SYMBOL(scsi_cmd_ioctl);
@@ -717,7 +717,7 @@ int scsi_verify_blk_ioctl(struct block_device *bd, unsigned int cmd)
                 * and we do not want to spam dmesg about it.   CD-ROMs do
                 * not have partitions, so we get here only for disks.
                 */
-               return -ENOTTY;
+               return -ENOIOCTLCMD;
        default:
                break;
        }
@@ -729,7 +729,7 @@ int scsi_verify_blk_ioctl(struct block_device *bd, unsigned int cmd)
        printk_ratelimited(KERN_WARNING
                           "%s: sending ioctl %x to a partition!\n", current->comm, cmd);
 
-       return -ENOTTY;
+       return -ENOIOCTLCMD;
 }
 EXPORT_SYMBOL(scsi_verify_blk_ioctl);