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

Commit 12f981f9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6:
  pci: hotplug: pciehp: fix error code path in hpc_power_off_slot
  PCI: Add DECLARE_PCI_DEVICE_TABLE macro
  PCI: fix up error messages for pci_bus registering
  PCI: fix section mismatch warning in pci_scan_child_bus
  PCI: consolidate duplicated MSI enable functions
  PCI: use dev_printk in quirk messages
parents 10955d22 c1ef5cbd
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -123,7 +123,8 @@ initialization with a pointer to a structure describing the driver




The ID table is an array of struct pci_device_id entries ending with an
The ID table is an array of struct pci_device_id entries ending with an
all-zero entry.  Each entry consists of:
all-zero entry; use of the macro DECLARE_PCI_DEVICE_TABLE is the preferred
method of declaring the table.  Each entry consists of:


	vendor,device	Vendor and device ID to match (or PCI_ANY_ID)
	vendor,device	Vendor and device ID to match (or PCI_ANY_ID)


@@ -191,7 +192,8 @@ Tips on when/where to use the above attributes:


	o Do not mark the struct pci_driver.
	o Do not mark the struct pci_driver.


	o The ID table array should be marked __devinitdata.
	o The ID table array should be marked __devinitconst; this is done
	  automatically if the table is declared with DECLARE_PCI_DEVICE_TABLE().


	o The probe() and remove() functions should be marked __devinit
	o The probe() and remove() functions should be marked __devinit
	  and __devexit respectively.  All initialization functions
	  and __devexit respectively.  All initialization functions
+6 −4
Original line number Original line Diff line number Diff line
@@ -145,13 +145,15 @@ void pci_bus_add_devices(struct pci_bus *bus)
			child_bus = dev->subordinate;
			child_bus = dev->subordinate;
			child_bus->dev.parent = child_bus->bridge;
			child_bus->dev.parent = child_bus->bridge;
			retval = device_register(&child_bus->dev);
			retval = device_register(&child_bus->dev);
			if (!retval)
			if (retval)
				dev_err(&dev->dev, "Error registering pci_bus,"
					" continuing...\n");
			else
				retval = device_create_file(&child_bus->dev,
				retval = device_create_file(&child_bus->dev,
							&dev_attr_cpuaffinity);
							&dev_attr_cpuaffinity);
			if (retval)
			if (retval)
				dev_err(&dev->dev, "Error registering pci_bus"
				dev_err(&dev->dev, "Error creating cpuaffinity"
					" device bridge symlink,"
					" file, continuing...\n");
					" continuing...\n");
		}
		}
	}
	}
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -4,7 +4,7 @@
#include "pci.h"
#include "pci.h"




unsigned int pci_do_scan_bus(struct pci_bus *bus)
unsigned int __devinit pci_do_scan_bus(struct pci_bus *bus)
{
{
	unsigned int max;
	unsigned int max;


+1 −1
Original line number Original line Diff line number Diff line
@@ -1085,7 +1085,7 @@ static int acpiphp_bus_trim(acpi_handle handle)
 * This function should be called per *physical slot*,
 * This function should be called per *physical slot*,
 * not per each slot object in ACPI namespace.
 * not per each slot object in ACPI namespace.
 */
 */
static int enable_device(struct acpiphp_slot *slot)
static int __ref enable_device(struct acpiphp_slot *slot)
{
{
	struct pci_dev *dev;
	struct pci_dev *dev;
	struct pci_bus *bus = slot->bridge->pci_bus;
	struct pci_bus *bus = slot->bridge->pci_bus;
+1 −1
Original line number Original line Diff line number Diff line
@@ -250,7 +250,7 @@ int cpci_led_off(struct slot* slot)
 * Device configuration functions
 * Device configuration functions
 */
 */


int cpci_configure_slot(struct slot* slot)
int __ref cpci_configure_slot(struct slot *slot)
{
{
	struct pci_bus *parent;
	struct pci_bus *parent;
	int fn;
	int fn;
Loading