Diff for /src/sys/dev/acpica/Attic/acpi_powerres.c between versions 1.1 and 1.2

version 1.1, 2003/09/24 03:32:16 version 1.2, 2004/05/05 22:19:23
Line 157  acpi_pwr_register_resource(ACPI_HANDLE r Line 157  acpi_pwr_register_resource(ACPI_HANDLE r
         return_ACPI_STATUS(AE_OK);              /* already know about it */          return_ACPI_STATUS(AE_OK);              /* already know about it */
   
     /* allocate a new resource */      /* allocate a new resource */
     if ((rp = malloc(sizeof(*rp), M_ACPIPWR, M_NOWAIT | M_ZERO)) == NULL) {      rp = malloc(sizeof(*rp), M_ACPIPWR, M_INTWAIT | M_ZERO);
         status = AE_NO_MEMORY;  
         goto out;  
     }  
     TAILQ_INIT(&rp->ap_references);      TAILQ_INIT(&rp->ap_references);
     rp->ap_resource = res;      rp->ap_resource = res;
   
Line 249  acpi_pwr_register_consumer(ACPI_HANDLE c Line 246  acpi_pwr_register_consumer(ACPI_HANDLE c
         return_ACPI_STATUS(AE_OK);          return_ACPI_STATUS(AE_OK);
           
     /* allocate a new power consumer */      /* allocate a new power consumer */
     if ((pc = malloc(sizeof(*pc), M_ACPIPWR, M_NOWAIT)) == NULL)      pc = malloc(sizeof(*pc), M_ACPIPWR, M_INTWAIT);
         return_ACPI_STATUS(AE_NO_MEMORY);  
     TAILQ_INSERT_HEAD(&acpi_powerconsumers, pc, ac_link);      TAILQ_INSERT_HEAD(&acpi_powerconsumers, pc, ac_link);
     TAILQ_INIT(&pc->ac_references);      TAILQ_INIT(&pc->ac_references);
     pc->ac_consumer = consumer;      pc->ac_consumer = consumer;
Line 523  acpi_pwr_reference_resource(ACPI_OBJECT Line 519  acpi_pwr_reference_resource(ACPI_OBJECT
     ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "found power resource %s\n", acpi_name(rp->ap_resource)));      ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "found power resource %s\n", acpi_name(rp->ap_resource)));
   
     /* create a reference between the consumer and resource */      /* create a reference between the consumer and resource */
     if ((pr = malloc(sizeof(*pr), M_ACPIPWR, M_NOWAIT | M_ZERO)) == NULL) {      pr = malloc(sizeof(*pr), M_ACPIPWR, M_INTWAIT | M_ZERO);
         ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "couldn't allocate memory for a power consumer reference\n"));  
         return_VOID;  
     }  
     pr->ar_consumer = pc;      pr->ar_consumer = pc;
     pr->ar_resource = rp;      pr->ar_resource = rp;
     TAILQ_INSERT_TAIL(&pc->ac_references, pr, ar_clink);      TAILQ_INSERT_TAIL(&pc->ac_references, pr, ar_clink);

Removed from v.1.1  
changed lines
  Added in v.1.2