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

Commit 1359f270 authored by Alex Chiang's avatar Alex Chiang Committed by Jesse Barnes
Browse files

PCI Hotplug core: add 'name' param pci_hp_register interface



Update pci_hp_register() to take a const char *name parameter.

The motivation for this is to clean up the individual hotplug
drivers so that each one does not have to manage its own name.
The PCI core should be the place where we manage the name.

We update the interface and all callsites first, in a
"no functional change" manner, and clean up the drivers later.

Cc: kristen.c.accardi@intel.com
Acked-by: default avatarKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Reviewed-by: default avatarMatthew Wilcox <willy@linux.intel.com>
Signed-off-by: default avatarAlex Chiang <achiang@hp.com>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 48ff96ce
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -340,7 +340,8 @@ int acpiphp_register_hotplug_slot(struct acpiphp_slot *acpiphp_slot)

	retval = pci_hp_register(slot->hotplug_slot,
					acpiphp_slot->bridge->pci_bus,
					acpiphp_slot->device);
					acpiphp_slot->device,
					slot->name);
	if (retval == -EBUSY)
		goto error_hpslot;
	if (retval) {
+2 −1
Original line number Diff line number Diff line
@@ -285,7 +285,8 @@ cpci_hp_register_bus(struct pci_bus *bus, u8 first, u8 last)
		info->attention_status = cpci_get_attention_status(slot);

		dbg("registering slot %s", slot->hotplug_slot->name);
		status = pci_hp_register(slot->hotplug_slot, bus, i);
		status = pci_hp_register(slot->hotplug_slot, bus, i,
					 slot->hotplug_slot->name);
		if (status) {
			err("pci_hp_register failed with error %d", status);
			goto error_name;
+2 −1
Original line number Diff line number Diff line
@@ -436,7 +436,8 @@ static int ctrl_slot_setup(struct controller *ctrl,
				slot_number);
		result = pci_hp_register(hotplug_slot,
					 ctrl->pci_dev->subordinate,
					 slot->device);
					 slot->device,
					 hotplug_slot->name);
		if (result) {
			err("pci_hp_register failed with error %d\n", result);
			goto error_name;
+2 −1
Original line number Diff line number Diff line
@@ -126,7 +126,8 @@ static int add_slot(struct pci_dev *dev)
	slot->release = &dummy_release;
	slot->private = dslot;

	retval = pci_hp_register(slot, dev->bus, PCI_SLOT(dev->devfn));
	retval = pci_hp_register(slot, dev->bus, PCI_SLOT(dev->devfn),
				 slot->name);
	if (retval) {
		err("pci_hp_register failed with error %d\n", retval);
		goto error_dslot;
+2 −1
Original line number Diff line number Diff line
@@ -966,7 +966,8 @@ static int __init ebda_rsrc_controller (void)
	list_for_each_entry(tmp_slot, &ibmphp_slot_head, ibm_slot_list) {
		snprintf (tmp_slot->hotplug_slot->name, 30, "%s", create_file_name (tmp_slot));
		pci_hp_register(tmp_slot->hotplug_slot,
			pci_find_bus(0, tmp_slot->bus), tmp_slot->device);
			pci_find_bus(0, tmp_slot->bus), tmp_slot->device,
			tmp_slot->hotplug_slot->name);
	}

	print_ebda_hpc ();
Loading