Author: myles Date: Wed Sep 1 23:03:03 2010 New Revision: 5763 URL: https://tracker.coreboot.org/trac/coreboot/changeset/5763
Log: Simplify last_dev_p so that it matches comments.
Signed-off-by: Myles Watson mylesgw@gmail.com Acked-by: Myles Watson mylesgw@gmail.com
Modified: trunk/src/devices/device.c trunk/util/sconfig/main.c
Modified: trunk/src/devices/device.c ============================================================================== --- trunk/src/devices/device.c Wed Sep 1 18:27:13 2010 (r5762) +++ trunk/src/devices/device.c Wed Sep 1 23:03:03 2010 (r5763) @@ -42,7 +42,7 @@ /** Linked list of ALL devices */ struct device *all_devices = &dev_root; /** Pointer to the last device */ -extern struct device **last_dev_p; +extern struct device *last_dev; /** Linked list of free resources */ struct resource *free_resources = NULL;
@@ -95,8 +95,8 @@ /* Append a new device to the global device list. * The list is used to find devices once everything is set up. */ - *last_dev_p = dev; - last_dev_p = &dev->next; + last_dev->next = dev; + last_dev = dev;
spin_unlock(&dev_lock); return dev;
Modified: trunk/util/sconfig/main.c ============================================================================== --- trunk/util/sconfig/main.c Wed Sep 1 18:27:13 2010 (r5762) +++ trunk/util/sconfig/main.c Wed Sep 1 23:03:03 2010 (r5763) @@ -446,7 +446,7 @@ } fprintf(staticc, "\n/* pass 0 */\n"); 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);
fclose(staticc);