From patchwork Tue Apr 18 13:49:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 9685527 X-Patchwork-Delegate: dvhart@infradead.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CE16960375 for ; Tue, 18 Apr 2017 13:55:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF9D82839C for ; Tue, 18 Apr 2017 13:55:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B4484283E2; Tue, 18 Apr 2017 13:55:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39BB42839C for ; Tue, 18 Apr 2017 13:55:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752735AbdDRNzL (ORCPT ); Tue, 18 Apr 2017 09:55:11 -0400 Received: from cloudserver094114.home.net.pl ([79.96.170.134]:65379 "EHLO cloudserver094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752674AbdDRNzL (ORCPT ); Tue, 18 Apr 2017 09:55:11 -0400 Received: from adks54.ipv4.supernova.orange.pl (79.184.252.54) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.82) id 7f444920a156a2bc; Tue, 18 Apr 2017 15:55:09 +0200 From: "Rafael J. Wysocki" To: Darren Hart Cc: LKML , Linux PM , platform-driver-x86@vger.kernel.org, Andy Shevchenko Subject: [PATCH] platform: x86: intel-hid: Add missing ->thaw callback Date: Tue, 18 Apr 2017 15:49:06 +0200 Message-ID: <3369188.n8HfSBcO3V@aspire.rjw.lan> User-Agent: KMail/4.14.10 (Linux/4.11.0-rc6+; KDE/4.14.9; x86_64; ; ) MIME-Version: 1.0 Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rafael J. Wysocki The intel-hid driver is missing a PM ->thaw callback allowing the device to go back to the operational state after creating a hibernation image or when there is an image restoration error during resume. The lack of the ->thaw callback basically means that all events signaled by the device are discarded after a hibernation image has been created which may be problematic, for example, if the image cannot be saved (eg. due to an I/O issue with storage). Signed-off-by: Rafael J. Wysocki --- drivers/platform/x86/intel-hid.c | 1 + 1 file changed, 1 insertion(+) Index: linux-pm/drivers/platform/x86/intel-hid.c =================================================================== --- linux-pm.orig/drivers/platform/x86/intel-hid.c +++ linux-pm/drivers/platform/x86/intel-hid.c @@ -136,6 +136,7 @@ static int intel_hid_pl_resume_handler(s static const struct dev_pm_ops intel_hid_pl_pm_ops = { .freeze = intel_hid_pl_suspend_handler, + .thaw = intel_hid_pl_resume_handler, .restore = intel_hid_pl_resume_handler, .suspend = intel_hid_pl_suspend_handler, .resume = intel_hid_pl_resume_handler,