This patch continues the device code cleanup.

The largest changes are to get_pci_bridge_ops, and related changes to make it
compile and use correct declarations.  

While I was doing that I moved the checks for CONFIG_<BUS>_PLUGIN_SUPPORT to
the Makefile.

The only functional difference is a possible NULL dereference in a debug
statement.

I also added a few more consts, now that my other patch is in.

Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@983 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
Myles Watson 2008-11-05 22:27:36 +00:00
commit f3e9e1dd35
9 changed files with 79 additions and 81 deletions

View file

@ -27,6 +27,6 @@ unsigned int cardbus_scan_bus(struct bus *bus,
unsigned int cardbus_scan_bridge(struct device *dev, unsigned int max);
void cardbus_enable_resources(struct device *dev);
extern struct device_operations default_cardbus_ops_bus;
extern const struct device_operations default_cardbus_ops_bus;
#endif /* DEVICE_CARDBUS_H */

View file

@ -57,7 +57,6 @@ struct smbus_bus_operations;
struct bus;
struct pci_domain_id
{
u16 vendor, device;
@ -137,7 +136,7 @@ struct device_operations {
* constructors->constructor(constructors->constructor) and a new
* device is created.
*/
void (*constructor)(struct device *, struct device_operations *);
void (*constructor)(struct device *, const struct device_operations *);
/* set device ops */
void (*phase1_set_device_operations)(struct device *dev);
@ -231,7 +230,7 @@ struct device {
/* number of buses attached to the device */
unsigned int links;
struct device_operations *ops;
const struct device_operations *ops;
void *device_configuration;
};
@ -273,7 +272,7 @@ struct device * dev_find_class (unsigned int class, struct device * from);
struct device * dev_find_slot (unsigned int bus, unsigned int devfn);
EXPORT_SYMBOL(dev_find_slot);
struct device * dev_find_slot_on_smbus (unsigned int bus, unsigned int addr);
void default_device_constructor(struct device *dev, struct device_operations *constructor);
void default_device_constructor(struct device *dev, const struct device_operations *constructor);
/* Rounding for boundaries.

View file

@ -71,10 +71,10 @@ extern struct pci_driver pci_drivers[];
extern struct pci_driver epci_drivers[];
extern struct device_operations default_pci_ops_dev;
extern struct device_operations default_pci_ops_bus;
extern struct pci_operations pci_dev_ops_pci;
extern struct pci_operations pci_bus_ops_pci;
extern const struct device_operations default_pci_ops_dev;
extern const struct device_operations default_pci_ops_bus;
extern const struct pci_operations pci_dev_ops_pci;
extern const struct pci_operations pci_bus_ops_pci;
void pci_dev_read_resources(struct device * dev);
void pci_bus_read_resources(struct device * dev);

View file

@ -26,6 +26,6 @@ unsigned int pcie_scan_bus(struct bus *bus,
unsigned min_devfn, unsigned max_devfn, unsigned int max);
unsigned int pcie_scan_bridge(struct device *dev, unsigned int max);
extern struct device_operations default_pcie_ops_bus;
extern const struct device_operations default_pcie_ops_bus;
#endif /* DEVICE_PCIE_H */