From patchwork Tue Jan 18 05:13:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 485371 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0I5Db4P010974 for ; Tue, 18 Jan 2011 05:13:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750929Ab1ARFNh (ORCPT ); Tue, 18 Jan 2011 00:13:37 -0500 Received: from mail-iw0-f174.google.com ([209.85.214.174]:52052 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750876Ab1ARFNg (ORCPT ); Tue, 18 Jan 2011 00:13:36 -0500 Received: by iwn9 with SMTP id 9so5371949iwn.19 for ; Mon, 17 Jan 2011 21:13:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=SD8Zu/VGSwO/ak/foZbfWk1Xu3w5SW+44wXFt/B0vT4=; b=kvBIymm/8DyhYCO/gAk6fIhUL6atnEshpC8T5ZLDcFVzt1uRKqCVOhLQbtPeiAu+yj lv3v2ZbBNFIMlCCZvKjq2neZJB1GLntZonHgb+uZgNE1AXS4TBjckmesrmlgvw84x9AC NO3+gLXNLJn5B1YizVhXReOfwriL8RJZ0xBfM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=sWtc1jyp1407EHO8MSJwmMTDWmlV5I3LEFA1DARbhL6W+gaAqgdc8Z93A7gBEK40ew cy7DUj93+nmWM1KxhCxzeh8imKdOcmfbVycCveQYmaxCNUmGrDIfSn7Y9ZCL4ajxvnM/ fwhU84P4JO1ieu7lgOjabtZrk6fFGfk0YlubQ= Received: by 10.42.225.197 with SMTP id it5mr5535407icb.331.1295327615644; Mon, 17 Jan 2011 21:13:35 -0800 (PST) Received: from mailhub.coreip.homeip.net (c-98-234-113-65.hsd1.ca.comcast.net [98.234.113.65]) by mx.google.com with ESMTPS id g4sm3210950ick.11.2011.01.17.21.13.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 17 Jan 2011 21:13:33 -0800 (PST) Date: Mon, 17 Jan 2011 21:13:28 -0800 From: Dmitry Torokhov To: riyer@nvidia.com Cc: tsoni@codeaurora.org, pavel@ucw.cz, shubhrajyoti@ti.com, ccross@android.com, konkers@android.com, olof@lixom.net, achew@nvidia.com, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org Subject: Re: [PATCH v5] input: tegra-kbc - Add tegra keyboard driver Message-ID: <20110118051328.GE23851@core.coreip.homeip.net> References: <1294943248-18631-1-git-send-email-riyer@nvidia.com> <20110118051216.GD23851@core.coreip.homeip.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110118051216.GD23851@core.coreip.homeip.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 18 Jan 2011 05:13:38 +0000 (UTC) diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c index a6ec3fc..c3c0c65 100644 --- a/drivers/input/keyboard/tegra-kbc.c +++ b/drivers/input/keyboard/tegra-kbc.c @@ -658,9 +658,10 @@ static int __devexit tegra_kbc_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM -static int tegra_kbc_suspend(struct platform_device *pdev, pm_message_t state) +#ifdef CONFIG_PM_SLEEP +static int tegra_kbc_suspend(struct device *dev) { + struct platform_device *pdev = to_platform_device(dev); struct tegra_kbc *kbc = platform_get_drvdata(pdev); if (device_may_wakeup(&pdev->dev)) { @@ -679,8 +680,9 @@ static int tegra_kbc_suspend(struct platform_device *pdev, pm_message_t state) return 0; } -static int tegra_kbc_resume(struct platform_device *pdev) +static int tegra_kbc_resume(struct device *dev) { + struct platform_device *pdev = to_platform_device(dev); struct tegra_kbc *kbc = platform_get_drvdata(pdev); int err = 0; @@ -698,17 +700,16 @@ static int tegra_kbc_resume(struct platform_device *pdev) } #endif +static SIMPLE_DEV_PM_OPS(tegra_kbc_pm_ops, tegra_kbc_suspend, tegra_kbc_resume); + static struct platform_driver tegra_kbc_driver = { .probe = tegra_kbc_probe, .remove = __devexit_p(tegra_kbc_remove), -#ifdef CONFIG_PM - .suspend = tegra_kbc_suspend, - .resume = tegra_kbc_resume, -#endif .driver = { .name = "tegra-kbc", .owner = THIS_MODULE, - } + .pm = &tegra_kbc_pm_ops, + }, }; static void __exit tegra_kbc_exit(void)