From patchwork Fri May 1 17:05:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Witold Szczeponik X-Patchwork-Id: 6311911 X-Patchwork-Delegate: rjw@sisk.pl 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1A258BEEE1 for ; Fri, 1 May 2015 17:05:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3DD532043C for ; Fri, 1 May 2015 17:05:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 502C92042B for ; Fri, 1 May 2015 17:05:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751726AbbEARFc (ORCPT ); Fri, 1 May 2015 13:05:32 -0400 Received: from mout.gmx.net ([212.227.15.18]:62545 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751704AbbEARF3 (ORCPT ); Fri, 1 May 2015 13:05:29 -0400 Received: from localhost.localdomain ([37.49.123.43]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0LZhoi-1ZZMyY1awO-00lWTa; Fri, 01 May 2015 19:05:26 +0200 From: Witold Szczeponik To: rjw@rjwysocki.net Cc: Witold Szczeponik , lenb@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ACPI/PNP: add two IDs to list for PNPACPI device enumeration Date: Fri, 1 May 2015 19:05:20 +0200 Message-Id: <1430499920-28599-1-git-send-email-Witold.Szczeponik@gmx.net> X-Mailer: git-send-email 2.0.5 X-Provags-ID: V03:K0:ev36HscB+ALMUd0h87SZrT5rcdsZ9bhK5dC+pAsgtTfEtoL1lG6 geG0PxaVRrFAP7oo+NiySyy3W3Fz0/r0Uv2UTG6Q2Vk0VOMqnhmJunTJjOh8EEYPHnsTSm7 6FSC3RrtYUR4u9eBdDALYmrhnKG9xweH7sHTHMXw/J07t7XBKUvy5qJtYqOWLcxjAB8Sw1f 3g41b3iirX+KNFv8vg2aQ== X-UI-Out-Filterresults: notjunk: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,FREEMAIL_FROM, 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 Commit eec15edbb0e14485998635ea7c62e30911b465f0 ("ACPI / PNP: use device ID list for PNPACPI device enumeration") changed the way how ACPI devices are enumerated and when they are added to the PNP bus. However, it broke the sound card support on (at least) a vintage IBM ThinkPad 600E: with said commit applied, two of the necessary "CSC01xx" devices are not added to the PNP bus and hence can not be found during the initialization of the "snd-cs4236" module. As a consequence, loading "snd-cs4236" causes null pointer exceptions. The attached patch fixes the problem end re-enables sound on the IBM ThinkPad 600E. The patch is applied against Linux 4.0.x. NB: A quick way to see if existing devices are missing from the PNP bus, the following script can be used to list candidates IDs. hids="/sys/bus/acpi/devices/*/hid" for hid in $(grep -v -h -E -e "^(LNX|PNP|ACPI)" $hids | sort -u) do grep -q \"$hid\" drivers/acpi/acpi_pnp.c || echo $hid done Signed-off-by: Witold Szczeponik diff --git a/drivers/acpi/acpi_pnp.c b/drivers/acpi/acpi_pnp.c index b193f84..ff6d8ad 100644 --- a/drivers/acpi/acpi_pnp.c +++ b/drivers/acpi/acpi_pnp.c @@ -304,6 +304,8 @@ static const struct acpi_device_id acpi_pnp_device_ids[] = { {"PNPb006"}, /* cs423x-pnpbios */ {"CSC0100"}, + {"CSC0103"}, + {"CSC0110"}, {"CSC0000"}, {"GIM0100"}, /* Guillemot Turtlebeach something appears to be cs4232 compatible */ /* es18xx-pnpbios */