aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/scsi_scan.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index f55e5f166973..dff17c198a72 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -1845,14 +1845,13 @@ static void do_scsi_scan_host(struct Scsi_Host *shost)
1845 } 1845 }
1846} 1846}
1847 1847
1848static int do_scan_async(void *_data) 1848static void do_scan_async(void *_data, async_cookie_t c)
1849{ 1849{
1850 struct async_scan_data *data = _data; 1850 struct async_scan_data *data = _data;
1851 struct Scsi_Host *shost = data->shost; 1851 struct Scsi_Host *shost = data->shost;
1852 1852
1853 do_scsi_scan_host(shost); 1853 do_scsi_scan_host(shost);
1854 scsi_finish_async_scan(data); 1854 scsi_finish_async_scan(data);
1855 return 0;
1856} 1855}
1857 1856
1858/** 1857/**
@@ -1861,7 +1860,6 @@ static int do_scan_async(void *_data)
1861 **/ 1860 **/
1862void scsi_scan_host(struct Scsi_Host *shost) 1861void scsi_scan_host(struct Scsi_Host *shost)
1863{ 1862{
1864 struct task_struct *p;
1865 struct async_scan_data *data; 1863 struct async_scan_data *data;
1866 1864
1867 if (strncmp(scsi_scan_type, "none", 4) == 0) 1865 if (strncmp(scsi_scan_type, "none", 4) == 0)
@@ -1876,9 +1874,11 @@ void scsi_scan_host(struct Scsi_Host *shost)
1876 return; 1874 return;
1877 } 1875 }
1878 1876
1879 p = kthread_run(do_scan_async, data, "scsi_scan_%d", shost->host_no); 1877 /* register with the async subsystem so wait_for_device_probe()
1880 if (IS_ERR(p)) 1878 * will flush this work
1881 do_scan_async(data); 1879 */
1880 async_schedule(do_scan_async, data);
1881
1882 /* scsi_autopm_put_host(shost) is called in scsi_finish_async_scan() */ 1882 /* scsi_autopm_put_host(shost) is called in scsi_finish_async_scan() */
1883} 1883}
1884EXPORT_SYMBOL(scsi_scan_host); 1884EXPORT_SYMBOL(scsi_scan_host);