On Thu, Aug 03, 2006 at 07:17:37PM +0200, Thomas Renninger wrote:

 > +/* 
 > + * returns:
 > + *   0 on success
 > + *  <0 on failure
 > + *   1 if new battery found
 > + *   2 if battery got removed
 > + */

Why make this so complicated...

 > +    result = acpi_battery_check(battery);
 > +    if (result > 0){
 > +            acpi_bus_generate_event(device,
 > +                                    ACPI_NOTIFY_DEVICE_CHECK,
 > +                                    battery->flags.present);
 > +    }
 > +    return 0;
 > +}

When we simply treat the result as a boolean ?

                Dave

-- 
http://www.codemonkey.org.uk
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to