public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Thomas Renninger <trenn@suse.de>
Cc: linux-acpi <linux-acpi@vger.kernel.org>,
	"Brown, Len" <len.brown@intel.com>
Subject: Re: [PATCH] Check battery after resume
Date: Thu, 3 Aug 2006 15:02:20 -0400	[thread overview]
Message-ID: <20060803190220.GD11577@redhat.com> (raw)
In-Reply-To: <1154625457.4302.556.camel@queen.suse.de>

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

  reply	other threads:[~2006-08-03 19:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-03 17:17 [PATCH] Check battery after resume Thomas Renninger
2006-08-03 19:02 ` Dave Jones [this message]
2006-08-04 13:46   ` Thomas Renninger
2006-08-04 17:09     ` Dave Jones
2006-08-07 15:22       ` Thomas Renninger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060803190220.GD11577@redhat.com \
    --to=davej@redhat.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=trenn@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox