From patchwork Thu Feb 25 00:22:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derek Basehore X-Patchwork-Id: 8415421 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B879A9F2F0 for ; Thu, 25 Feb 2016 00:23:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ED876202F0 for ; Thu, 25 Feb 2016 00:23:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2CC982034A for ; Thu, 25 Feb 2016 00:23:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758854AbcBYAWh (ORCPT ); Wed, 24 Feb 2016 19:22:37 -0500 Received: from mail-pf0-f176.google.com ([209.85.192.176]:33505 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757784AbcBYAWf (ORCPT ); Wed, 24 Feb 2016 19:22:35 -0500 Received: by mail-pf0-f176.google.com with SMTP id q63so22026501pfb.0 for ; Wed, 24 Feb 2016 16:22:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iEsXOVdUe3RyKzdogXawX+/lZJVScqNCMZYJ0lOCjEc=; b=i/jBE4P4lL1TpxPUUlvsFkcW9g1g2cAKNYupE1tciQId3Qt3lIhvjy71spnNGXzkuB 9GuVPrDWPDnFd7qwbmIIAuN1cJ+deufhSC5/4eaGs1zCGzlgLdJ2fG0BeRoQBUKmjCC5 uafOGtQVf6TMqycP7eeKgrHQtZK+vUkn3ZBF8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=iEsXOVdUe3RyKzdogXawX+/lZJVScqNCMZYJ0lOCjEc=; b=Y1mn0HeWL5fuOelF4oCS3aYrcdwxzGoIlj1X3HLeWOEw0zNe3wuNIsPfhf/Q7hFKXu cYCSH/VhOoaoJdMhXocZ3aCVjNxM3cbDAv83p/8dpWwReC1MMVl6sHi2ggvHqyEVOd+d Sa+vZ5UkLMXszogqtmaSUw0IgM9U/fNNEcIgApVU9WQN3FCnx+Yy0qa0C2jD8e+QEdKt zTUx3dvRScLfxMXH3MuhwJEkj3362JwrB4l5UBdzdOeAIQ/33qIEtHyjASBBRU4kbo26 f2/8jkrVQ3aUxV9MVJ9FlwUywYABoIU6SsEI2dFqYnU0SttuHNeLuaNaGT5UYLQpFzjR FtAA== X-Gm-Message-State: AG10YOQLLdb+pDrqARdwXoGTVG5VmAJGYhmUaTB6a7H0X0wp86S1eoxc4zaGkKCJ6zA0Bw== X-Received: by 10.98.12.133 with SMTP id 5mr59364598pfm.20.1456359754535; Wed, 24 Feb 2016 16:22:34 -0800 (PST) Received: from ketosis.mtv.corp.google.com ([172.22.65.104]) by smtp.gmail.com with ESMTPSA id m87sm7519956pfj.38.2016.02.24.16.22.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 Feb 2016 16:22:34 -0800 (PST) From: Derek Basehore To: linux-pm@vger.kernel.org Cc: "Rafael J . Wysocki" , Len Brown , Pavel Machek , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, "Martin K . Petersen" , linux-scsi@vger.kernel.org, Derek Basehore Subject: [PATCH v2 3/3] scsi: allow scsi devices to use direct complete Date: Wed, 24 Feb 2016 16:22:28 -0800 Message-Id: <1456359748-22838-3-git-send-email-dbasehore@chromium.org> X-Mailer: git-send-email 2.7.0.rc3.207.g0ac5344 In-Reply-To: <1456359748-22838-1-git-send-email-dbasehore@chromium.org> References: <1456359748-22838-1-git-send-email-dbasehore@chromium.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This allows scsi devices to remain runtime suspended for system suspend. Since runtime suspend is stricter than system suspend callbacks, this is just returning a positive number for the prepare callback. Signed-off-by: Derek Basehore Reviewed-by: Eric Caruso --- drivers/scsi/scsi_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_pm.c b/drivers/scsi/scsi_pm.c index b44c1bb..7af76ad 100644 --- a/drivers/scsi/scsi_pm.c +++ b/drivers/scsi/scsi_pm.c @@ -178,7 +178,7 @@ static int scsi_bus_prepare(struct device *dev) /* Wait until async scanning is finished */ scsi_complete_async_scans(); } - return 0; + return 1; } static int scsi_bus_suspend(struct device *dev)