Author: blueswirl Date: 2009-01-05 21:14:07 +0100 (Mon, 05 Jan 2009) New Revision: 353
Modified: openbios-devel/drivers/ide.c openbios-devel/drivers/pci.c openbios-devel/drivers/pci_database.h Log: Use field compat from pci_dev_t to fill "compatible" property. (Laurent Vivier)
Modified: openbios-devel/drivers/ide.c =================================================================== --- openbios-devel/drivers/ide.c 2009-01-05 20:08:04 UTC (rev 352) +++ openbios-devel/drivers/ide.c 2009-01-05 20:14:07 UTC (rev 353) @@ -1287,7 +1287,6 @@ props[0]=14; props[1]=0; set_property(ph, "interrupts", (char *)&props, 2*sizeof(int));
- set_property(ph, "compatible", "pci1095,646\0pci1095,646\0pciclass,01018f", 40); set_int_property(ph, "#address-cells", 1); set_int_property(ph, "#size-cells", 0);
Modified: openbios-devel/drivers/pci.c =================================================================== --- openbios-devel/drivers/pci.c 2009-01-05 20:08:04 UTC (rev 352) +++ openbios-devel/drivers/pci.c 2009-01-05 20:14:07 UTC (rev 353) @@ -185,6 +185,9 @@ push_str("model"); fword("property"); } + if (pci_dev->compat) + set_property(dev, "compatible", + pci_dev->compat, pci_compat_len(pci_dev)); push_str(pci_dev->name); fword("encode-string"); push_str("class");
Modified: openbios-devel/drivers/pci_database.h =================================================================== --- openbios-devel/drivers/pci_database.h 2009-01-05 20:08:04 UTC (rev 352) +++ openbios-devel/drivers/pci_database.h 2009-01-05 20:14:07 UTC (rev 353) @@ -26,7 +26,7 @@ extern int macio_config_cb(const pci_config_t *config); extern int vga_config_cb(const pci_config_t *config);
-static inline int pci_compat_len(pci_dev_t *dev) +static inline int pci_compat_len(const pci_dev_t *dev) { int len, ret; const char *path = dev->compat;