From patchwork Tue Mar 24 12:15:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 46305 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 847A72159D for ; Wed, 25 Mar 2015 03:27:45 +0000 (UTC) Received: by wghb13 with SMTP id b13sf1972952wgh.3 for ; Tue, 24 Mar 2015 20:27:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:subject:date :message-id:in-reply-to:references:mime-version:cc:precedence :list-id:list-unsubscribe:list-archive:list-post:list-help :list-subscribe:content-type:content-transfer-encoding:errors-to :sender:x-original-sender:x-original-authentication-results :mailing-list; bh=qgqnsIcMNd7O0PbaV3VNJLodL/AdmQ8+1y6Hbsb4W/g=; b=jOCQbdL0nawlQmgbl8SJ5t/GZzTv8hAwGyG9kQ0XzLs9HMaQhxuC6P8EqFGvfRFQPM TybTUlFy771o+HkxKIHt75ftDqegsjrsSxLNfAli+KrP1TPX4WUkkqkBySjgtG+kMdAk CyltqLO5lesK63hwdOPUtNoHOMQ5RqkmnikNhyuArqiehxQt4SIRU5LcMfYWXZavVG9c n8YPUHLBLaWCiGvzKejJUtlnnnc6L+bG3iUt6f0PXZY0Rv6FGyD9V+2/XpMekWK2RZuU GtfQ8dW1Di/PodSRP5z3k6IcwfZ73d2mT5xHuNL/AmvAk/6PAdvRhawW5ptD2lVSdnIs Uxqw== X-Gm-Message-State: ALoCoQm+wtQGGprkZzYjnml3av1P60nEcKGqYftPOLfH0dDVhJZ3DuImQwKEHg0GjAzhS1iMHvHz X-Received: by 10.180.90.169 with SMTP id bx9mr3774486wib.6.1427254064778; Tue, 24 Mar 2015 20:27:44 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.9.38 with SMTP id w6ls44447laa.13.gmail; Tue, 24 Mar 2015 20:27:44 -0700 (PDT) X-Received: by 10.112.161.229 with SMTP id xv5mr6503451lbb.6.1427254064614; Tue, 24 Mar 2015 20:27:44 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id yd8si849738lbb.144.2015.03.24.20.27.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Mar 2015 20:27:44 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by labe2 with SMTP id e2so9575836lab.3 for ; Tue, 24 Mar 2015 20:27:44 -0700 (PDT) X-Received: by 10.112.162.167 with SMTP id yb7mr6352506lbb.76.1427254064517; Tue, 24 Mar 2015 20:27:44 -0700 (PDT) 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.57.201 with SMTP id k9csp1832176lbq; Tue, 24 Mar 2015 20:27:44 -0700 (PDT) X-Received: by 10.68.131.225 with SMTP id op1mr12970826pbb.86.1427253698535; Tue, 24 Mar 2015 20:21:38 -0700 (PDT) Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id lw6si1562059pdb.189.2015.03.24.20.21.37; Tue, 24 Mar 2015 20:21:38 -0700 (PDT) Received-SPF: none (google.com: dri-devel-bounces@lists.freedesktop.org does not designate permitted sender hosts) client-ip=131.252.210.177; Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 47990720C4; Tue, 24 Mar 2015 20:21:21 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by gabe.freedesktop.org (Postfix) with ESMTP id 4386A6E6C2 for ; Tue, 24 Mar 2015 05:17:02 -0700 (PDT) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id t2OCGxDT024870; Tue, 24 Mar 2015 07:16:59 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id t2OCGw0p014514; Tue, 24 Mar 2015 07:16:58 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.224.2; Tue, 24 Mar 2015 07:16:58 -0500 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id t2OCGCXl032032; Tue, 24 Mar 2015 07:16:57 -0500 From: Tomi Valkeinen To: Subject: [PATCH 36/36] drm/omap: tiler: add hibernation callback Date: Tue, 24 Mar 2015 14:15:53 +0200 Message-ID: <1427199353-4412-37-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.3.3 In-Reply-To: <1427199353-4412-1-git-send-email-tomi.valkeinen@ti.com> References: <1427199353-4412-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 24 Mar 2015 20:20:48 -0700 Cc: Tomi Valkeinen , Grygorii Strashko , Laurent Pinchart X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: tomi.valkeinen@ti.com 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.48 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 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 Reviewed-by: Rob Clark [tomi valkeinen: add missing 'static'] Signed-off-by: Tomi Valkeinen --- 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 20db850a1656..042038e8a662 100644 --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c @@ -965,7 +965,7 @@ error: } #endif -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static int omap_dmm_resume(struct device *dev) { struct tcm_area area; @@ -989,12 +989,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 +static SIMPLE_DEV_PM_OPS(omap_dmm_pm_ops, NULL, omap_dmm_resume); + #if defined(CONFIG_OF) static const struct dmm_platform_data dmm_omap4_platform_data = { .cpu_cache_flags = OMAP_BO_WC, @@ -1024,9 +1022,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 }, };