Simplify last_dev_p so that it matches comments.
Signed-off-by: Myles Watson <mylesgw@gmail.com> Acked-by: Myles Watson <mylesgw@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5763 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
c3fad5633b
commit
70679a095a
|
@ -42,7 +42,7 @@
|
||||||
/** Linked list of ALL devices */
|
/** Linked list of ALL devices */
|
||||||
struct device *all_devices = &dev_root;
|
struct device *all_devices = &dev_root;
|
||||||
/** Pointer to the last device */
|
/** Pointer to the last device */
|
||||||
extern struct device **last_dev_p;
|
extern struct device *last_dev;
|
||||||
/** Linked list of free resources */
|
/** Linked list of free resources */
|
||||||
struct resource *free_resources = NULL;
|
struct resource *free_resources = NULL;
|
||||||
|
|
||||||
|
@ -95,8 +95,8 @@ device_t alloc_dev(struct bus *parent, struct device_path *path)
|
||||||
/* Append a new device to the global device list.
|
/* Append a new device to the global device list.
|
||||||
* The list is used to find devices once everything is set up.
|
* The list is used to find devices once everything is set up.
|
||||||
*/
|
*/
|
||||||
*last_dev_p = dev;
|
last_dev->next = dev;
|
||||||
last_dev_p = &dev->next;
|
last_dev = dev;
|
||||||
|
|
||||||
spin_unlock(&dev_lock);
|
spin_unlock(&dev_lock);
|
||||||
return dev;
|
return dev;
|
||||||
|
|
|
@ -446,7 +446,7 @@ int main(int argc, char** argv) {
|
||||||
}
|
}
|
||||||
fprintf(staticc, "\n/* pass 0 */\n");
|
fprintf(staticc, "\n/* pass 0 */\n");
|
||||||
walk_device_tree(staticc, &root, pass0, NULL);
|
walk_device_tree(staticc, &root, pass0, NULL);
|
||||||
fprintf(staticc, "\n/* pass 1 */\nstruct mainboard_config mainboard_info_0;\nstruct device **last_dev_p = &%s.next;\n", lastdev->name);
|
fprintf(staticc, "\n/* pass 1 */\nstruct mainboard_config mainboard_info_0;\nstruct device *last_dev = &%s;\n", lastdev->name);
|
||||||
walk_device_tree(staticc, &root, pass1, NULL);
|
walk_device_tree(staticc, &root, pass1, NULL);
|
||||||
|
|
||||||
fclose(staticc);
|
fclose(staticc);
|
||||||
|
|
Loading…
Reference in New Issue