]> git.saurik.com Git - apple/xnu.git/blobdiff - iokit/Kernel/IOPMinformee.cpp
xnu-3248.50.21.tar.gz
[apple/xnu.git] / iokit / Kernel / IOPMinformee.cpp
index 99afbcee0c69d1bf3ba127f867500d2147f901db..3889ffe44172c58a4e637d0f296871578c5c5381 100644 (file)
 #include <IOKit/pwr_mgt/IOPMinformee.h>
 
 #define super OSObject
-OSDefineMetaClassAndStructors(IOPMinformee,OSObject)
+
+OSDefineMetaClassAndStructors(IOPMinformee, OSObject)
+
 
 //*********************************************************************************
-// constructor
+// static constructor
 //
 //*********************************************************************************
+IOPMinformee *IOPMinformee::withObject( IOService *theObject )
+{
+    IOPMinformee        *newInformee = new IOPMinformee;
+    
+    if (!newInformee) return NULL;
+    newInformee->init();
+    newInformee->initialize( theObject );
+    return newInformee;
+}
+
 
+//*********************************************************************************
+// constructor
+//
+//*********************************************************************************
 void IOPMinformee::initialize ( IOService * theObject )
 {
    whatObject = theObject;
    timer = 0;
+   active = true;
    whatObject->retain();
-    
 }
 
 
@@ -48,7 +65,6 @@ void IOPMinformee::initialize ( IOService * theObject )
 // free
 //
 //*********************************************************************************
-
 void IOPMinformee::free (void )
 {
     whatObject->release();