From patchwork Tue Apr 14 10:41:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 6214791 Return-Path: X-Original-To: patchwork-linux-input@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 5A1969F1C4 for ; Tue, 14 Apr 2015 10:44:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7BD1D201CE for ; Tue, 14 Apr 2015 10:44:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 88751202E9 for ; Tue, 14 Apr 2015 10:44:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754386AbbDNKn0 (ORCPT ); Tue, 14 Apr 2015 06:43:26 -0400 Received: from mail-la0-f41.google.com ([209.85.215.41]:36673 "EHLO mail-la0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754812AbbDNKmp (ORCPT ); Tue, 14 Apr 2015 06:42:45 -0400 Received: by lagv1 with SMTP id v1so4418859lag.3 for ; Tue, 14 Apr 2015 03:42:43 -0700 (PDT) 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=cm4TMgiPVD92jPpJHVT5E50KgaD4nZfP8sFDRPKZJs4=; b=kYghrpQd2BqIwqLiX5dUI8vzBXt/l/uD1Dx+0gKPJdKu8eshdw8SXlrqfNUz3Pl7yX Pi7Y+WVYAttgzSiN+Uhs3Y8urC7Fxl8zyt1oYaESe202fv1dOaTTvRhnuEeJmuJpVGYW Z9+ZHzuNp85CbCSEgELU31rL9FKIhGi2wDNCRudnex6wn46x7dDluU2r+j9uSeYAbKp5 CvT124Cu7kk+hiUz7wsNDnMFkkegYSg6mx6zZUOEu4YCT6sFAxrB74hzWHBI0S+Pb5vr pKtZhZaT0kkAWXDTekG+wGB3DYLm1VumDCLYrfV/huM/B0zpOTOyHQ34tcl5r2ky22LL xEhw== X-Gm-Message-State: ALoCoQmoUPN0ZdKWZeTkYGaQc7JWB070txsy4H/NA+Gs5gT+LVrA1AEppxNjf8J3m+i/4enkRcWH X-Received: by 10.112.72.2 with SMTP id z2mr17281705lbu.39.1429008163568; Tue, 14 Apr 2015 03:42:43 -0700 (PDT) Received: from uffe-Latitude-E6430s.lan (90-231-160-185-no158.tbcn.telia.com. [90.231.160.185]) by mx.google.com with ESMTPSA id nj1sm148443lbc.0.2015.04.14.03.42.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Apr 2015 03:42:42 -0700 (PDT) From: Ulf Hansson To: Russell King , Dmitry Torokhov Cc: linux-arm-kernel@lists.infradead.org, linux-input@vger.kernel.org, Ulf Hansson Subject: [PATCH] input: ambakmi: Fix system PM by converting to modern callbacks Date: Tue, 14 Apr 2015 12:41:48 +0200 Message-Id: <1429008108-29295-1-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@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 The legacy system PM support has long time ago been dropped from the AMBA bus. Align to that by converting to the modern system PM callbacks. Fixes: 26825cfd90f9 (ARM: 7914/1: amba: Drop legacy PM support ...) Signed-off-by: Ulf Hansson --- drivers/input/serio/ambakmi.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c index 8b748d9..058e1d8 100644 --- a/drivers/input/serio/ambakmi.c +++ b/drivers/input/serio/ambakmi.c @@ -175,15 +175,19 @@ static int amba_kmi_remove(struct amba_device *dev) return 0; } -static int amba_kmi_resume(struct amba_device *dev) +#ifdef CONFIG_PM_SLEEP +static int amba_kmi_resume(struct device *dev) { - struct amba_kmi_port *kmi = amba_get_drvdata(dev); + struct amba_kmi_port *kmi = dev_get_drvdata(dev); /* kick the serio layer to rescan this port */ serio_reconnect(kmi->io); return 0; } +#endif + +static SIMPLE_DEV_PM_OPS(amba_kmi_dev_pm_ops, NULL, amba_kmi_resume); static struct amba_id amba_kmi_idtable[] = { { @@ -199,11 +203,11 @@ static struct amba_driver ambakmi_driver = { .drv = { .name = "kmi-pl050", .owner = THIS_MODULE, + .pm = &amba_kmi_dev_pm_ops, }, .id_table = amba_kmi_idtable, .probe = amba_kmi_probe, .remove = amba_kmi_remove, - .resume = amba_kmi_resume, }; module_amba_driver(ambakmi_driver);