sconfig: Make cur_bus and cur_parent local to the parser.

Instead of accessing them globally, pass them as arguments where necessary.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5524 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Patrick Georgi
2010-05-05 12:05:25 +00:00
parent 114e7b2990
commit 68befd5d34
4 changed files with 104 additions and 95 deletions

View File

@ -74,7 +74,7 @@ struct device {
struct reg *reg;
};
extern struct device *cur_parent, *cur_bus;
struct device *head;
struct header;
struct header {
@ -85,9 +85,9 @@ struct header {
void fold_in(struct device *parent);
void postprocess_devtree(void);
struct device *new_chip(char *path);
struct device *new_chip(struct device *parent, struct device *bus, char *path);
void add_header(struct device *dev);
struct device *new_device(const int bus, const char *devnum, int enabled);
struct device *new_device(struct device *parent, struct device *busdev, const int bus, const char *devnum, int enabled);
void alias_siblings(struct device *d);
void add_resource(int type, int index, int base);
void add_register(char *name, char *val);
void add_resource(struct device *dev, int type, int index, int base);
void add_register(struct device *dev, char *name, char *val);