From patchwork Tue Aug 4 20:44:17 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Chiang X-Patchwork-Id: 39207 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n74KiQ4J020479 for ; Tue, 4 Aug 2009 20:44:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754562AbZHDUoT (ORCPT ); Tue, 4 Aug 2009 16:44:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753728AbZHDUoT (ORCPT ); Tue, 4 Aug 2009 16:44:19 -0400 Received: from g1t0029.austin.hp.com ([15.216.28.36]:30888 "EHLO g1t0029.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753281AbZHDUoS (ORCPT ); Tue, 4 Aug 2009 16:44:18 -0400 Received: from g5t0030.atlanta.hp.com (g5t0030.atlanta.hp.com [16.228.8.142]) by g1t0029.austin.hp.com (Postfix) with ESMTP id 7D8913858F; Tue, 4 Aug 2009 20:44:19 +0000 (UTC) Received: from ldl (ldl.fc.hp.com [15.11.146.30]) by g5t0030.atlanta.hp.com (Postfix) with ESMTP id ED2712434B; Tue, 4 Aug 2009 20:44:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ldl (Postfix) with ESMTP id C46ABCF001E; Tue, 4 Aug 2009 14:44:17 -0600 (MDT) Received: from ldl ([127.0.0.1]) by localhost (ldl.fc.hp.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id U-nB1vEJrG6y; Tue, 4 Aug 2009 14:44:17 -0600 (MDT) Received: by ldl (Postfix, from userid 17609) id AEF96CF000D; Tue, 4 Aug 2009 14:44:17 -0600 (MDT) Date: Tue, 4 Aug 2009 14:44:17 -0600 From: Alex Chiang To: lenb@kernel.org Cc: chad.smith@hp.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, stable@kernel.org Subject: [PATCH] ACPI: pci_slot.ko wants a 64-bit _SUN Message-ID: <20090804204417.GA26918@ldl.fc.hp.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Similar to commit b6adc195 (PCI hotplug: acpiphp wants a 64-bit _SUN), pci_slot.ko reads and creates sysfs directories based on the _SUN method. Certain HP platforms return 64 bits in _SUN. This change to pci_slot.ko allows us to see the correct sysfs directories. Reported-by: Chad Smith Cc: stable@kernel.org Signed-off-by: Alex Chiang --- Stable team, this should be backported to all kernels in the stable series. --- -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/acpi/pci_slot.c b/drivers/acpi/pci_slot.c index 12158e0..ab40e06 100644 --- a/drivers/acpi/pci_slot.c +++ b/drivers/acpi/pci_slot.c @@ -57,7 +57,7 @@ ACPI_MODULE_NAME("pci_slot"); MY_NAME , ## arg); \ } while (0) -#define SLOT_NAME_SIZE 20 /* Inspired by #define in acpiphp.h */ +#define SLOT_NAME_SIZE 21 /* Inspired by #define in acpiphp.h */ struct acpi_pci_slot { acpi_handle root_handle; /* handle of the root bridge */ @@ -149,7 +149,7 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv) return AE_OK; } - snprintf(name, sizeof(name), "%u", (u32)sun); + snprintf(name, sizeof(name), "%llu", sun); pci_slot = pci_create_slot(pci_bus, device, name, NULL); if (IS_ERR(pci_slot)) { err("pci_create_slot returned %ld\n", PTR_ERR(pci_slot));