Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 492d5422 authored by Dan Williams's avatar Dan Williams Committed by James Bottomley
Browse files

[SCSI] cleanup usages of scsi_complete_async_scans



Now that scsi registers its async scan work with the async subsystem,
wait_for_device_probe() is sufficient for ensuring all scanning is
complete.

[jejb: fix merge problems with eea03c20 Make wait_for_device_probe() also do scsi_complete_async_scans()]
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
Tested-by: default avatarEldad Zack <eldad@fogrefinery.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 6cdd5520
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -24,7 +24,6 @@
#include <linux/wait.h>
#include <linux/wait.h>
#include <linux/async.h>
#include <linux/async.h>
#include <linux/pm_runtime.h>
#include <linux/pm_runtime.h>
#include <scsi/scsi_scan.h>


#include "base.h"
#include "base.h"
#include "power/power.h"
#include "power/power.h"
@@ -333,7 +332,6 @@ void wait_for_device_probe(void)
	/* wait for the known devices to complete their probing */
	/* wait for the known devices to complete their probing */
	wait_event(probe_waitqueue, atomic_read(&probe_count) == 0);
	wait_event(probe_waitqueue, atomic_read(&probe_count) == 0);
	async_synchronize_full();
	async_synchronize_full();
	scsi_complete_async_scans();
}
}
EXPORT_SYMBOL_GPL(wait_for_device_probe);
EXPORT_SYMBOL_GPL(wait_for_device_probe);


+0 −12
Original line number Original line Diff line number Diff line
@@ -187,18 +187,6 @@ int scsi_complete_async_scans(void)
	return 0;
	return 0;
}
}


/* Only exported for the benefit of scsi_wait_scan */
EXPORT_SYMBOL_GPL(scsi_complete_async_scans);

#ifndef MODULE
/*
 * For async scanning we need to wait for all the scans to complete before
 * trying to mount the root fs.  Otherwise non-modular drivers may not be ready
 * yet.
 */
late_initcall(scsi_complete_async_scans);
#endif

/**
/**
 * scsi_unlock_floptical - unlock device via a special MODE SENSE command
 * scsi_unlock_floptical - unlock device via a special MODE SENSE command
 * @sdev:	scsi device to send command to
 * @sdev:	scsi device to send command to

include/scsi/scsi_scan.h

deleted100644 → 0
+0 −11
Original line number Original line Diff line number Diff line
#ifndef _SCSI_SCSI_SCAN_H
#define _SCSI_SCSI_SCAN_H

#ifdef CONFIG_SCSI
/* drivers/scsi/scsi_scan.c */
extern int scsi_complete_async_scans(void);
#else
static inline int scsi_complete_async_scans(void) { return 0; }
#endif

#endif /* _SCSI_SCSI_SCAN_H */