public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI: pci_slot.ko wants a 64-bit _SUN
@ 2009-08-04 20:44 Alex Chiang
  2009-08-31 17:37 ` Len Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Chiang @ 2009-08-04 20:44 UTC (permalink / raw)
  To: lenb; +Cc: chad.smith, linux-acpi, linux-kernel, stable

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 <chad.smith@hp.com>
Cc: stable@kernel.org
Signed-off-by: Alex Chiang <achiang@hp.com>
---
Stable team, this should be backported to all kernels in the
stable series.

---
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));

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ACPI: pci_slot.ko wants a 64-bit _SUN
  2009-08-04 20:44 [PATCH] ACPI: pci_slot.ko wants a 64-bit _SUN Alex Chiang
@ 2009-08-31 17:37 ` Len Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2009-08-31 17:37 UTC (permalink / raw)
  To: Alex Chiang; +Cc: chad.smith, linux-acpi, linux-kernel, stable

applied for linux-2.6.31

thanks,
Len Brown, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-31 17:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-04 20:44 [PATCH] ACPI: pci_slot.ko wants a 64-bit _SUN Alex Chiang
2009-08-31 17:37 ` Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox