From patchwork Sat Mar 15 17:37:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "lan,Tianyu" X-Patchwork-Id: 3838071 Return-Path: X-Original-To: patchwork-linux-acpi@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 735CABF540 for ; Sat, 15 Mar 2014 17:37:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 812052037A for ; Sat, 15 Mar 2014 17:37:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 81FC92037F for ; Sat, 15 Mar 2014 17:37:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756088AbaCORhf (ORCPT ); Sat, 15 Mar 2014 13:37:35 -0400 Received: from mga11.intel.com ([192.55.52.93]:46849 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755958AbaCORhe (ORCPT ); Sat, 15 Mar 2014 13:37:34 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 15 Mar 2014 10:37:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,661,1389772800"; d="scan'208";a="499346545" Received: from unknown (HELO localhost) ([10.255.21.225]) by fmsmga002.fm.intel.com with ESMTP; 15 Mar 2014 10:37:31 -0700 From: Lan Tianyu To: lenb@kernel.org, rjw@rjwysocki.net, richard.musil@gmail.com Cc: Lan Tianyu , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Subject: [Fix PATCH] ACPI/Button: Add ACPI Button event via netlink routine Date: Sat, 15 Mar 2014 13:37:13 -0400 Message-Id: <1394905033-5695-1-git-send-email-tianyu.lan@intel.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@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=unavailable 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 Commit 1696d9d(ACPI: Remove the old /proc/acpi/event interface) removes ACPI Button event which originally was sent to userspace via /proc/acpi/event. This causes ACPI shutdown regression on gentoo in the VirtualBox. Now ACPI events are sent to userspace via netlink. This patch is to add ACPI Button event back via netlink routine. Reference: https://bugzilla.kernel.org/show_bug.cgi?id=71721 Reported-and-tested-by: Richard Musil Signed-off-by: Lan Tianyu Cc: # 3.11.x --- drivers/acpi/button.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 714e957..db35594 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c @@ -302,6 +302,10 @@ static void acpi_button_notify(struct acpi_device *device, u32 event) input_sync(input); pm_wakeup_event(&device->dev, 0); + acpi_bus_generate_netlink_event( + device->pnp.device_class, + dev_name(&device->dev), + event, ++button->pushed); } break; default: