Merge branch 'marvell/dt' into late2/dt
[firefly-linux-kernel-4.4.55.git] / kernel / power / user.c
index 33c4329205af0e88da9e80ee98e9ff0e1259bf7d..4ed81e74f86fbb2a9d7b0ab8e7d105d0944763c0 100644 (file)
@@ -12,7 +12,6 @@
 #include <linux/suspend.h>
 #include <linux/syscalls.h>
 #include <linux/reboot.h>
-#include <linux/kmod.h>
 #include <linux/string.h>
 #include <linux/device.h>
 #include <linux/miscdevice.h>
@@ -25,7 +24,6 @@
 #include <linux/console.h>
 #include <linux/cpu.h>
 #include <linux/freezer.h>
-#include <scsi/scsi_scan.h>
 
 #include <asm/uaccess.h>
 
@@ -85,7 +83,6 @@ static int snapshot_open(struct inode *inode, struct file *filp)
                 * appear.
                 */
                wait_for_device_probe();
-               scsi_complete_async_scans();
 
                data->swap = -1;
                data->mode = O_WRONLY;
@@ -222,14 +219,8 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
                sys_sync();
                printk("done.\n");
 
-               error = usermodehelper_disable();
-               if (error)
-                       break;
-
                error = freeze_processes();
-               if (error)
-                       usermodehelper_enable();
-               else
+               if (!error)
                        data->frozen = 1;
                break;
 
@@ -238,7 +229,6 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
                        break;
                pm_restore_gfp_mask();
                thaw_processes();
-               usermodehelper_enable();
                data->frozen = 0;
                break;