From patchwork Fri Apr 26 20:02:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sylwester Nawrocki X-Patchwork-Id: 2495571 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 59ADF3FDC4 for ; Fri, 26 Apr 2013 20:04:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756111Ab3DZUEV (ORCPT ); Fri, 26 Apr 2013 16:04:21 -0400 Received: from mail-ee0-f46.google.com ([74.125.83.46]:60802 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754611Ab3DZUEV (ORCPT ); Fri, 26 Apr 2013 16:04:21 -0400 Received: by mail-ee0-f46.google.com with SMTP id c13so1833027eek.19 for ; Fri, 26 Apr 2013 13:04:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=fwPqX/VQLtPv2S+0m6504issxLFgYIPpbrI73URXvE8=; b=R7H5sIWCx4xHvhrICgd4KpleAmoAQUWTdmFXPTs1O7YQEQH8Q68RRpj435DfsBl3Ry dKFeHnDpKQowPnnX8vnXhLjqdhxI9kVOLLoc1CP2t7i3tPr5W8PsuEAUQx5fSvl3tjQZ bvyvP7j51IIySIpMSaVhnL+3Uc2tUkiYG1/JocyjsE0PyMEV/8E1qAQJhTGRx+HmWbkP txRh1N8MOLtoqq9kDZD1DJdxSMI+w1M1/UokMkVPJz2K+WDKZA6Lo+rjnOxOFSso+6QA LawNn5SF/5DIX07FpvKslboKUBHnIwaL6hz2x4Jleih3ecSG8npI5eEiHZEz/J18NC74 v1Cw== X-Received: by 10.15.36.135 with SMTP id i7mr59262921eev.34.1367006659846; Fri, 26 Apr 2013 13:04:19 -0700 (PDT) Received: from localhost.localdomain (093105185086.warszawa.vectranet.pl. [93.105.185.86]) by mx.google.com with ESMTPSA id cd3sm17841788eeb.6.2013.04.26.13.04.18 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 26 Apr 2013 13:04:19 -0700 (PDT) From: Sylwester Nawrocki To: kgene.kim@samsung.com, FlorianSchandinat@gmx.de Cc: linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Sylwester Nawrocki Subject: [PATCH 5/9] s3c2410fb: Use dev_pm_ops Date: Fri, 26 Apr 2013 22:02:19 +0200 Message-Id: <1367006543-5458-6-git-send-email-sylvester.nawrocki@gmail.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1367006543-5458-1-git-send-email-sylvester.nawrocki@gmail.com> References: <1367006543-5458-1-git-send-email-sylvester.nawrocki@gmail.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Use the driver PM ops rather than legacy suspend/resume callbacks. Also use CONFIG_PM_SLEEP switch to compile in the system sleep code instead of CONFIG_PM. Signed-off-by: Sylwester Nawrocki --- drivers/video/s3c2410fb.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c index d6706f7..479ab45 100644 --- a/drivers/video/s3c2410fb.c +++ b/drivers/video/s3c2410fb.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -36,10 +37,6 @@ #include #include -#ifdef CONFIG_PM -#include -#endif - #include "s3c2410fb.h" /* Debugging stuff */ @@ -1044,8 +1041,7 @@ static int s3c2410fb_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM - +#ifdef CONFIG_PM_SLEEP /* suspend and resume support for the lcd controller */ static int s3c2410fb_suspend(struct platform_device *dev, pm_message_t state) { @@ -1081,9 +1077,14 @@ static int s3c2410fb_resume(struct platform_device *dev) return 0; } +static const struct dev_pm_ops s3c2410fb_pm_ops = { + .resume = s3c2410fb_resume, + .suspend = s3c2410fb_suspend, +}; + +#define S3C2410FB_PM_OPS (&s3c2410fb_pm_ops) #else -#define s3c2410fb_suspend NULL -#define s3c2410fb_resume NULL +#define S3C2410FB_PM_OPS (NULL) #endif static struct platform_device_id s3c2410fb_driver_ids[] = { @@ -1099,12 +1100,11 @@ static struct platform_device_id s3c2410fb_driver_ids[] = { static struct platform_driver s3c2410fb_driver = { .probe = s3c2410fb_probe, .remove = s3c2410fb_remove, - .suspend = s3c2410fb_suspend, - .resume = s3c2410fb_resume, .id_table = s3c2410fb_driver_ids, .driver = { .name = "s3c2410-lcd", .owner = THIS_MODULE, + .pm = S3C2410FB_PM_OPS, }, };