From patchwork Thu Feb 13 06:40:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Barry Song <21cnbao@gmail.com> X-Patchwork-Id: 3642851 Return-Path: X-Original-To: patchwork-linux-input@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 EFFFBBF13A for ; Thu, 13 Feb 2014 06:45:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1E79D20154 for ; Thu, 13 Feb 2014 06:45:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2BBBF20145 for ; Thu, 13 Feb 2014 06:45:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751664AbaBMGlG (ORCPT ); Thu, 13 Feb 2014 01:41:06 -0500 Received: from mail-pb0-f54.google.com ([209.85.160.54]:61535 "EHLO mail-pb0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751174AbaBMGlG (ORCPT ); Thu, 13 Feb 2014 01:41:06 -0500 Received: by mail-pb0-f54.google.com with SMTP id uo5so10472740pbc.27 for ; Wed, 12 Feb 2014 22:41:04 -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:in-reply-to:references; bh=YSatJR25n7WkFGw69kIru2xMuduCcYQhd2Lbn3o37dI=; b=WYu/ZDHlGORtZJfPpf3H9f1wPNV8+2blBHYwQa3y5huNLIy8yWYsu9K9TJxsaUO2ow r7ZdtYq2tO4WJEP7LxLzy94Ki2vv87FtgTPhFVdPKVrdkJmJt/7IMvpVkHuK1P6Aaput fCLJcYhv3RhTRCYqo+F+wcsheyZnAhA65qULNnKj8F0D8SnER2i656dcI6OE4nuv6smt RiRxqpkBnRlcI6SOv3it3z61GknMNgFJKUiZVOsNfUtmLsRoXMxYIXntpkrC37kRpd/X 9eUUdyitmSJO1WnwvrSAYvUYVsGxedUX/SeOMYV2GaS0XG0L2Eq1qj0uiM8vsSXGIfq1 SorA== X-Received: by 10.66.25.101 with SMTP id b5mr44515636pag.101.1392273664830; Wed, 12 Feb 2014 22:41:04 -0800 (PST) Received: from barry-laptop.ROOT.PRI ([117.136.8.108]) by mx.google.com with ESMTPSA id si6sm6884868pab.19.2014.02.12.22.41.01 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Feb 2014 22:41:04 -0800 (PST) From: Barry Song <21cnbao@gmail.com> To: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org Cc: workgroup.linux@csr.com, Xianglong Du , Barry Song Subject: [PATCH 3/4] input: sirfsoc-onkey - use dev_get_drvdata instead of platform_get_drvdata Date: Thu, 13 Feb 2014 14:40:23 +0800 Message-Id: <1392273624-22920-4-git-send-email-21cnbao@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1392273624-22920-1-git-send-email-21cnbao@gmail.com> References: <1392273624-22920-1-git-send-email-21cnbao@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 From: Xianglong Du In resume entry, use dev_get_drvdata() instead of to_platform_device(dev) + platform_get_drvdata(pdev). Signed-off-by: Xianglong Du Signed-off-by: Barry Song --- drivers/input/misc/sirfsoc-onkey.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/input/misc/sirfsoc-onkey.c b/drivers/input/misc/sirfsoc-onkey.c index 097c10a..8e45bf11 100644 --- a/drivers/input/misc/sirfsoc-onkey.c +++ b/drivers/input/misc/sirfsoc-onkey.c @@ -157,8 +157,7 @@ static int sirfsoc_pwrc_remove(struct platform_device *pdev) #ifdef CONFIG_PM_SLEEP static int sirfsoc_pwrc_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct sirfsoc_pwrc_drvdata *pwrcdrv = platform_get_drvdata(pdev); + struct sirfsoc_pwrc_drvdata *pwrcdrv = dev_get_drvdata(dev); /* * Do not mask pwrc interrupt as we want pwrc work as a wakeup source