From e4e94ab95585d45d7c85e55b756ab29daedcb6f0 Mon Sep 17 00:00:00 2001 From: sonic Date: Fri, 25 Jan 2013 17:35:06 +0000 Subject: [PATCH] Use new Obtain() method to inform about device ownership git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@46380 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- workbench/devs/monitors/IntelGMA/intelG45_init.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/workbench/devs/monitors/IntelGMA/intelG45_init.c b/workbench/devs/monitors/IntelGMA/intelG45_init.c index 5459010bed..383086f362 100644 --- a/workbench/devs/monitors/IntelGMA/intelG45_init.c +++ b/workbench/devs/monitors/IntelGMA/intelG45_init.c @@ -226,12 +226,18 @@ AROS_UFH3(void, Enumerator, if (sd->forced || IsCompatible(ProductID)) { - UWORD MGCC = HIDD_PCIDevice_ReadConfigWord(pciDevice, G45_MGCC); + UWORD MGCC; - D(ULONG BSM = HIDD_PCIDevice_ReadConfigLong(pciDevice, G45_BSM)); - D(UBYTE MSAC = HIDD_PCIDevice_ReadConfigByte(pciDevice, G45_MSAC)); + if (HIDD_PCIDevice_Obtain(pciDevice, "IntelGMA")) + { + D(bug("[GMA] Failed to obtain device, already owned\n")); + return; + } - D(bug("[GMA] MGCC=%04x, BSM=%08x, MSAC=%08x\n", MGCC, BSM, MSAC)); + MGCC = HIDD_PCIDevice_ReadConfigWord(pciDevice, G45_MGCC); + D(bug("[GMA] MGCC=%04x, BSM=%08x, MSAC=%08x\n", MGCC, + HIDD_PCIDevice_ReadConfigLong(pciDevice, G45_BSM), + HIDD_PCIDevice_ReadConfigByte(pciDevice, G45_MSAC))); /*-------- DO NOT CHANGE/REMOVE -------------*/ bug("\003\n"); /* Tell vga text mode debug output to die */ -- 2.11.4.GIT