From patchwork Tue Jul 10 02:33:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 170021 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 7F72C2C0209 for ; Tue, 10 Jul 2012 12:16:55 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755423Ab2GJCQy (ORCPT ); Mon, 9 Jul 2012 22:16:54 -0400 Received: from mga01.intel.com ([192.55.52.88]:10885 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753088Ab2GJCQx (ORCPT ); Mon, 9 Jul 2012 22:16:53 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 09 Jul 2012 19:16:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.71,315,1320652800"; d="scan'208";a="175303922" Received: from dwillia2-linux.jf.intel.com ([10.7.137.146]) by fmsmga001.fm.intel.com with ESMTP; 09 Jul 2012 19:16:52 -0700 Received: from dwillia2-linux.jf.intel.com (localhost.localdomain [IPv6:::1]) by dwillia2-linux.jf.intel.com (Postfix) with ESMTP id 8B17A8003D; Mon, 9 Jul 2012 19:33:40 -0700 (PDT) Subject: [set4 resend PATCH 4/5] scsi: cleanup usages of scsi_complete_async_scans To: jgarzik@pobox.com, JBottomley@parallels.com From: Dan Williams Cc: Len Brown , linux-scsi@vger.kernel.org, Eldad Zack , "Rafael J. Wysocki" , linux-ide@vger.kernel.org, Arjan van de Ven Date: Mon, 09 Jul 2012 19:33:40 -0700 Message-ID: <20120710023340.26249.88941.stgit@dwillia2-linux.jf.intel.com> In-Reply-To: <20120710023241.26249.13718.stgit@dwillia2-linux.jf.intel.com> References: <20120710023241.26249.13718.stgit@dwillia2-linux.jf.intel.com> User-Agent: StGit/0.16-1-g7004 MIME-Version: 1.0 Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Now that scsi registers its async scan work with the async subsystem, wait_for_device_probe() is sufficient for ensuring all scanning is complete. Cc: Arjan van de Ven Cc: Len Brown Cc: Rafael J. Wysocki Cc: James Bottomley Tested-by: Eldad Zack Signed-off-by: Dan Williams --- drivers/scsi/scsi_scan.c | 12 ------------ include/scsi/scsi_scan.h | 11 ----------- kernel/power/hibernate.c | 8 -------- kernel/power/user.c | 2 -- 4 files changed, 33 deletions(-) delete mode 100644 include/scsi/scsi_scan.h -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index dff17c1..a0bc663 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -187,18 +187,6 @@ int scsi_complete_async_scans(void) 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 * @sdev: scsi device to send command to diff --git a/include/scsi/scsi_scan.h b/include/scsi/scsi_scan.h deleted file mode 100644 index 7889888..0000000 --- a/include/scsi/scsi_scan.h +++ /dev/null @@ -1,11 +0,0 @@ -#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 */ diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index 8b53db3..238025f 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c @@ -27,7 +27,6 @@ #include #include #include -#include #include "power.h" @@ -748,13 +747,6 @@ static int software_resume(void) async_synchronize_full(); } - /* - * We can't depend on SCSI devices being available after loading - * one of their modules until scsi_complete_async_scans() is - * called and the resume device usually is a SCSI one. - */ - scsi_complete_async_scans(); - swsusp_resume_device = name_to_dev_t(resume_file); if (!swsusp_resume_device) { error = -ENODEV; diff --git a/kernel/power/user.c b/kernel/power/user.c index 91b0fd0..4ed81e7 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c @@ -24,7 +24,6 @@ #include #include #include -#include #include @@ -84,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;