Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e24bc1c authored by Alex Chiang's avatar Alex Chiang Committed by Len Brown
Browse files

ACPI: pci_slot.ko wants a 64-bit _SUN



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: default avatarChad Smith <chad.smith@hp.com>
Cc: stable@kernel.org
Signed-off-by: default avatarAlex Chiang <achiang@hp.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent adda7661
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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));