Make dtsname a static part of the device structure.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@405 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
parent
864dc5687b
commit
adc9554e5c
2 changed files with 2 additions and 5 deletions
|
|
@ -221,10 +221,6 @@ struct device *alloc_dev(struct bus *parent, struct device_path *path,
|
|||
last_dev_p = &dev->next;
|
||||
|
||||
/* Give the device a name. */
|
||||
dev->dtsname = malloc(32);
|
||||
if (dev->dtsname == NULL) {
|
||||
die("DEV: out of memory.\n");
|
||||
}
|
||||
sprintf(dev->dtsname, "dynamic %s", dev_path(dev));
|
||||
|
||||
// spin_unlock(&dev_lock);
|
||||
|
|
|
|||
|
|
@ -169,6 +169,7 @@ struct bus {
|
|||
|
||||
#define MAX_RESOURCES 12
|
||||
#define MAX_LINKS 8
|
||||
#define MAX_DTSNAME_SIZE 64
|
||||
/*
|
||||
* There is one device structure for each slot-number/function-number
|
||||
* combination:
|
||||
|
|
@ -181,7 +182,7 @@ struct device {
|
|||
struct device * next; /* chain of all devices */
|
||||
|
||||
struct device_path path;
|
||||
char * dtsname; /* the name from the dts */
|
||||
char dtsname[MAX_DTSNAME_SIZE]; /* the name from the dts */
|
||||
unsigned vendor;
|
||||
unsigned device;
|
||||
unsigned int class; /* 3 bytes: (base,sub,prog-if) */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue