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: 5882211 Return-Path: X-Original-To: patchwork-linux-omap@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 73D2E9F269 for ; Wed, 25 Feb 2015 18:08:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 96B4C20353 for ; Wed, 25 Feb 2015 18:08:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C488C2034C for ; Wed, 25 Feb 2015 18:08:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752625AbbBYSI0 (ORCPT ); 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-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; bh=Iztwg53COhySrcHdSybGYN7QqQ8kfvYSyrcXfY/bFlw=; b=DpLjzx9JMGyqe+OeAkJYptHjhu49iXo4L3X1XuiVSFF7X/5kql722zpU7VUDYUw6pU B8n/jMygmThHlswFMUKezxgjH4/8chxmTeKcV2kJOpCFbYgnXtrAcKHLfULTl8F+aZMT l4za3GeveyTOqHxx0l9GqZ6uncea8X5GtJrEHvvPMsnRS1gVxEkgxHU/eGyZyeb5CRIP LHUhMqdFs4XbULaDC7oDDPYsPeJP4hVDPkDNyLl3GnLYAIRxDTXPTQXKhvv+GUZP/CWe GkRyBLH6k4jJWUP76b4p/qwgVe/VBRmdTpcKmYPj0BTpC8Xh6sTBUPoa34GbIKrrEVeR rNjg== X-Gm-Message-State: ALoCoQlCZBZKWhsfgN3NapgdCwT2lpLYjP8Qy+eZsh4FtVY94bD9MBcazqkwE8PABGsjNeeBkWL7 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: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 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 --- 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 }, };