2 Copyright 2010, The AROS Development Team. All rights reserved.
6 #include <aros/symbolsets.h>
10 #include <proto/exec.h>
11 #include <aros/debug.h>
13 #include "agp_private.h"
15 static int AgpHidd_ExpungeLib(LIBBASETYPEPTR LIBBASE
)
17 if (LIBBASE
->sd
.bridgedevice
)
18 OOP_DisposeObject(LIBBASE
->sd
.bridgedevice
);
20 if (LIBBASE
->sd
.hiddAGPBridgeDeviceAB
)
21 OOP_ReleaseAttrBase((STRPTR
)IID_Hidd_AGPBridgeDevice
);
23 if (LIBBASE
->sd
.hiddPCIDeviceAB
)
24 OOP_ReleaseAttrBase((STRPTR
)IID_Hidd_PCIDevice
);
26 if (LIBBASE
->sd
.pcibus
)
27 OOP_DisposeObject(LIBBASE
->sd
.pcibus
);
32 static int AgpHidd_InitLib(LIBBASETYPEPTR LIBBASE
)
34 LIBBASE
->sd
.bridgedevice
= NULL
;
36 LIBBASE
->sd
.hiddAGPBridgeDeviceAB
= OOP_ObtainAttrBase((STRPTR
)IID_Hidd_AGPBridgeDevice
);
37 LIBBASE
->sd
.hiddPCIDeviceAB
= OOP_ObtainAttrBase((STRPTR
)IID_Hidd_PCIDevice
);
39 LIBBASE
->sd
.pcibus
= OOP_NewObject(NULL
, CLID_Hidd_PCI
, NULL
);
41 if (LIBBASE
->sd
.hiddAGPBridgeDeviceAB
&& LIBBASE
->sd
.pcibus
&& LIBBASE
->sd
.hiddPCIDeviceAB
)
47 ADD2INITLIB(AgpHidd_InitLib
, 0)
48 ADD2EXPUNGELIB(AgpHidd_ExpungeLib
, 0)