From patchwork Tue Feb 18 03:25:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Badarkhe X-Patchwork-Id: 3667101 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2348FBF13A for ; Tue, 18 Feb 2014 03:27:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 29CD520176 for ; Tue, 18 Feb 2014 03:27:05 +0000 (UTC) Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 28077200F3 for ; Tue, 18 Feb 2014 03:27:04 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s1I3PtG1018921; Mon, 17 Feb 2014 21:25:56 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1I3PqgS026499; Mon, 17 Feb 2014 21:25:54 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Mon, 17 Feb 2014 21:25:52 -0600 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1I3PoZK025676; Mon, 17 Feb 2014 21:25:50 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id B2C0080627; Mon, 17 Feb 2014 21:25:50 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflxv17.itg.ti.com (dflxv17.itg.ti.com [128.247.5.93]) by linux.omap.com (Postfix) with ESMTP id 6C25880626 for ; Mon, 17 Feb 2014 21:25:49 -0600 (CST) Received: from medina.ext.ti.com (medina.ext.ti.com [192.91.81.31]) by dflxv17.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1I3PnFd000562 for ; Mon, 17 Feb 2014 21:25:49 -0600 Received: from mail6.bemta7.messagelabs.com (mail6.bemta7.messagelabs.com [216.82.255.55]) by medina.ext.ti.com (8.13.7/8.13.7) with ESMTP id s1I3Pmm9022394 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 17 Feb 2014 21:25:48 -0600 Received: from [216.82.253.147:43636] by server-3.bemta-7.messagelabs.com id F3/CA-02197-CB2D2035; Tue, 18 Feb 2014 03:25:48 +0000 X-Env-Sender: badarkhe.manish@gmail.com X-Msg-Ref: server-12.tower-165.messagelabs.com!1392693946!12604581!1 X-Originating-IP: [209.85.220.53] X-SpamReason: No, hits=0.0 required=7.0 tests=ML_RADAR_SPEW_LINKS_14, spamassassin: X-StarScan-Received: X-StarScan-Version: 6.9.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 15757 invoked from network); 18 Feb 2014 03:25:47 -0000 Received: from mail-pa0-f53.google.com (HELO mail-pa0-f53.google.com) (209.85.220.53) by server-12.tower-165.messagelabs.com with RC4-SHA encrypted SMTP; 18 Feb 2014 03:25:47 -0000 Received: by mail-pa0-f53.google.com with SMTP id lj1so16021621pab.26 for ; Mon, 17 Feb 2014 19:25:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=LB5BA66wmYOOm93WTRw2LVmUO9EYPsONAkl50rIQrlc=; b=N858/iUEiOJs+IGg4MO+OMGpzhfiZ26GHZns399IolfoWjeISLRjODEnOC7kL/+bXn /tMGtRO+iRvFKYIN6A/HbZGIGEh9+jDnnU/sfIrrce1wuNq4Hhf0QKVwm5Eadf3RHLi+ ffb1qsDpmCQYLD9MMjr0R5uFFKDNQdfAFcINbP6w6diTogOsX0FspoIk48HLzDuFCMyk spR7DC4fXBTf+OLaAGlHHt40DggeOBRRqRCEf3HFG5hO9BHCuCT1HGRufnYrZ+dBUluS SN3DZEfL5xPE0z2eUvDA7VWgO6o7Ki4UkCxsxq57LcZkj4YsPVXU2ugdtfSGcKobEI49 Bhfw== X-Received: by 10.68.204.161 with SMTP id kz1mr7250517pbc.156.1392693946268; Mon, 17 Feb 2014 19:25:46 -0800 (PST) Received: from manish-HP-Pavilion-dv4-Notebook-PC.connectify ([113.193.145.132]) by mx.google.com with ESMTPSA id nz11sm131124097pab.6.2014.02.17.19.25.42 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Feb 2014 19:25:45 -0800 (PST) From: Manish Badarkhe To: , , Subject: [PATCH] video: da8xx-fb: Use "SIMPLE_DEV_PM_OPS" macro Date: Tue, 18 Feb 2014 08:55:36 +0530 Message-ID: <1392693936-23862-1-git-send-email-badarkhe.manish@gmail.com> X-Mailer: git-send-email 1.7.10.4 CC: , X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, 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 Update driver to use SIMPLE_DEV_PM_OPS macro for power management suspend and resume operations. Signed-off-by: Manish Badarkhe --- :100644 100644 a1d74dd... 0c0ba92... M drivers/video/da8xx-fb.c drivers/video/da8xx-fb.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c index a1d74dd..0c0ba92 100644 --- a/drivers/video/da8xx-fb.c +++ b/drivers/video/da8xx-fb.c @@ -1546,7 +1546,7 @@ err_pm_runtime_disable: return ret; } -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static struct lcdc_context { u32 clk_enable; u32 ctrl; @@ -1610,9 +1610,9 @@ static void lcd_context_restore(void) return; } -static int fb_suspend(struct platform_device *dev, pm_message_t state) +static int fb_suspend(struct device *dev) { - struct fb_info *info = platform_get_drvdata(dev); + struct fb_info *info = dev_get_drvdata(dev); struct da8xx_fb_par *par = info->par; console_lock(); @@ -1622,18 +1622,18 @@ static int fb_suspend(struct platform_device *dev, pm_message_t state) fb_set_suspend(info, 1); lcd_disable_raster(DA8XX_FRAME_WAIT); lcd_context_save(); - pm_runtime_put_sync(&dev->dev); + pm_runtime_put_sync(dev); console_unlock(); return 0; } -static int fb_resume(struct platform_device *dev) +static int fb_resume(struct device *dev) { - struct fb_info *info = platform_get_drvdata(dev); + struct fb_info *info = dev_get_drvdata(dev); struct da8xx_fb_par *par = info->par; console_lock(); - pm_runtime_get_sync(&dev->dev); + pm_runtime_get_sync(dev); lcd_context_restore(); if (par->blank == FB_BLANK_UNBLANK) { lcd_enable_raster(); @@ -1647,19 +1647,17 @@ static int fb_resume(struct platform_device *dev) return 0; } -#else -#define fb_suspend NULL -#define fb_resume NULL #endif +static SIMPLE_DEV_PM_OPS(fb_pm_ops, fb_suspend, fb_resume); + static struct platform_driver da8xx_fb_driver = { .probe = fb_probe, .remove = fb_remove, - .suspend = fb_suspend, - .resume = fb_resume, .driver = { .name = DRIVER_NAME, .owner = THIS_MODULE, + .pm = &fb_pm_ops, }, }; module_platform_driver(da8xx_fb_driver);