[coreboot] [PATCH] v3: improve PCI device doxygen comments and printks
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Thu Aug 14 04:10:27 CEST 2008
Improve/fix PCI device doxygen comments and printks. As a bonus, the
boot messages are more understandable now.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
Index: corebootv3-pci_device_better_prints_comments/device/pci_device.c
===================================================================
--- corebootv3-pci_device_better_prints_comments/device/pci_device.c (Revision 759)
+++ corebootv3-pci_device_better_prints_comments/device/pci_device.c (Arbeitskopie)
@@ -929,12 +929,15 @@
/**
* Scan a PCI bus.
*
- * Determine the existence of a given PCI device.
+ * Determine the existence of a given PCI device. Allocate a new struct device
+ * if dev==NULL was passed in and the device exists.
*
+ * @param dev Pointer to the device structure if it already exists or NULL
* @param bus Pointer to the bus structure.
* @param devfn A device/function number.
* @return The device structure for the device (if found)
- * or the NULL if no device is found.
+ * or NULL if no device is found and dev==NULL was passed in
+ * or the device structure with enabled=0 if no device is found.
*/
struct device *pci_probe_dev(struct device *dev, struct bus *bus,
unsigned int devfn)
@@ -990,8 +993,8 @@
if ((id == 0xffffffff) || (id == 0x00000000) ||
(id == 0x0000ffff) || (id == 0xffff0000)) {
if (dev->enabled) {
- printk(BIOS_INFO,
- "Disabling static device: %s\n",
+ printk(BIOS_INFO, "PCI: Static device not "
+ "found, setting enabled=0: %s\n",
dev_path(dev));
dev->enabled = 0;
}
--
http://www.hailfinger.org/
More information about the coreboot
mailing list