From patchwork Wed Feb 25 18:08:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Grygorii.Strashko@linaro.org" X-Patchwork-Id: 45096 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7A13E2142A for ; Wed, 25 Feb 2015 18:08:30 +0000 (UTC) Received: by wghk14 with SMTP id k14sf4159639wgh.0 for ; Wed, 25 Feb 2015 10:08:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=tNVLC+yZQVc8mpjAEQpkhTJsIDV7treYvzcXWYUaZ2k=; b=Zmj511/E00HxmmTRIsGWNgEXmyS1mSHJorxBT55HtZcqujaIEhxVsYg3tze1u6LLEb R8G6+WgO0TloEdLhtTuvk9qUs/eY6tsgEoLQNmfi3NF9jdFZ88q+YrLzxdxS38Aw44GY /i7mIYOtdEnWMkdiSwjC8ClfvuItPU4pStSNXIa3BQLV8QVoaUq1JAPMQmQf79BDAD4M K8WIvmArey2uyQKeO12j2C8dzAzsHRGQh9dYtyx8A1qeaYTRQC6q9no6AmpxrrG6E79r 1ttwkb7Q4ih0j7F5M6/8MfqSfKUNVDglVCSDBb9FpgsvnQMksvPjmYdnV4wS0vy+jrJ2 6gAg== X-Gm-Message-State: ALoCoQnXSbQrfLsmaqzFp2chSc3cFp+cRdM0lUJsj5NGs3oqKAWb/aE3wDVCEyqc1+EmvbBGzbd/ X-Received: by 10.180.101.101 with SMTP id ff5mr3106328wib.5.1424887709774; Wed, 25 Feb 2015 10:08:29 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.246.38 with SMTP id xt6ls47643lac.102.gmail; Wed, 25 Feb 2015 10:08:29 -0800 (PST) X-Received: by 10.152.37.69 with SMTP id w5mr3992688laj.15.1424887709567; Wed, 25 Feb 2015 10:08:29 -0800 (PST) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id ug7si28538318lac.123.2015.02.25.10.08.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Feb 2015 10:08:29 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by labhs14 with SMTP id hs14so5733868lab.4 for ; Wed, 25 Feb 2015 10:08:29 -0800 (PST) X-Received: by 10.112.57.139 with SMTP id i11mr4028773lbq.106.1424887709401; Wed, 25 Feb 2015 10:08:29 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp2793154lbj; Wed, 25 Feb 2015 10:08:28 -0800 (PST) X-Received: by 10.68.252.198 with SMTP id zu6mr7549505pbc.102.1424887707425; Wed, 25 Feb 2015 10:08:27 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5si6754133pdp.117.2015.02.25.10.08.26; Wed, 25 Feb 2015 10:08:27 -0800 (PST) Received-SPF: none (google.com: linux-omap-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752625AbbBYSI0 (ORCPT + 5 others); Wed, 25 Feb 2015 13:08:26 -0500 Received: from mail-la0-f45.google.com ([209.85.215.45]:36465 "EHLO mail-la0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752358AbbBYSIZ (ORCPT ); Wed, 25 Feb 2015 13:08:25 -0500 Received: by labgq15 with SMTP id gq15so5755927lab.3 for ; Wed, 25 Feb 2015 10:08:24 -0800 (PST) X-Received: by 10.152.198.203 with SMTP id je11mr3999772lac.48.1424887703982; Wed, 25 Feb 2015 10:08:23 -0800 (PST) Received: from localhost ([195.238.92.128]) by mx.google.com with ESMTPSA id ki7sm5337225lbc.13.2015.02.25.10.08.23 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 25 Feb 2015 10:08:23 -0800 (PST) From: To: Tomi Valkeinen , David Airlie Cc: , , , , Grygorii Strashko Subject: [PATCH] drm/omap: tiler: add hibernation callback Date: Wed, 25 Feb 2015 20:08:20 +0200 Message-Id: <1424887700-5909-1-git-send-email-grygorii.strashko@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: grygorii.strashko@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Grygorii Strashko Setting a dev_pm_ops resume callback but not a set of hibernation handler means that pm function will not be called upon hibernation. Fix this by using SIMPLE_DEV_PM_OPS, which appropriately assigns the suspend and hibernation handlers and move omap_dmm_resume under CONFIG_PM_SLEEP to avoid build warnings. Signed-off-by: Grygorii Strashko --- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c index 56c6055..afb8cfc 100644 --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c @@ -941,7 +941,7 @@ error: } #endif -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static int omap_dmm_resume(struct device *dev) { struct tcm_area area; @@ -965,12 +965,10 @@ static int omap_dmm_resume(struct device *dev) return 0; } - -static const struct dev_pm_ops omap_dmm_pm_ops = { - .resume = omap_dmm_resume, -}; #endif +SIMPLE_DEV_PM_OPS(omap_dmm_pm_ops, NULL, omap_dmm_resume); + #if defined(CONFIG_OF) static const struct of_device_id dmm_of_match[] = { { .compatible = "ti,omap4-dmm", }, @@ -986,9 +984,7 @@ struct platform_driver omap_dmm_driver = { .owner = THIS_MODULE, .name = DMM_DRIVER_NAME, .of_match_table = of_match_ptr(dmm_of_match), -#ifdef CONFIG_PM .pm = &omap_dmm_pm_ops, -#endif }, };