Re: [PATCH] Check battery after resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux