From 6ac804f5941a2f7448c327ecfe0b117ee2382e50 Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Thu, 7 Feb 2008 16:17:21 +0000 Subject: [PATCH] This is a subtle error. An operations struct, to work as a constructor, must initialize the .constructor struct member. This error is so subtle that we might consider changing the device code; or at least working on the documentation to make it more clear. The key question: do we ever want an operations struct that can NOT operate as a device constructor? When this code was designed over a year ago, it seemed that we might; now, it is not so certain. Signed-off-by: Ronald G. Minnich Acked-by: Carl-Daniel Hailfinger git-svn-id: svn://coreboot.org/repository/coreboot-v3@577 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- southbridge/amd/cs5536/cs5536.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/southbridge/amd/cs5536/cs5536.c b/southbridge/amd/cs5536/cs5536.c index da5bad4fb3..b243b2c8b0 100644 --- a/southbridge/amd/cs5536/cs5536.c +++ b/southbridge/amd/cs5536/cs5536.c @@ -618,6 +618,7 @@ static void southbridge_init(struct device *dev) outl(0xDEADBEEF, 0xCFC); } #endif + printk(BIOS_SPEW, "cs5536: %s() Exit\n", __FUNCTION__); } /** @@ -631,9 +632,11 @@ static void cs5536_pci_dev_enable_resources(struct device *dev) printk(BIOS_SPEW, "cs5536: %s()\n", __FUNCTION__); pci_dev_enable_resources(dev); enable_childrens_resources(dev); + printk(BIOS_SPEW, "cs5536: %s() Exit\n", __FUNCTION__); } static struct device_operations southbridge_ops = { + .constructor = default_device_constructor, .phase3_scan = scan_static_bus, .phase4_read_resources = pci_dev_read_resources, .phase4_set_resources = pci_dev_set_resources,