All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Lan Tianyu <tianyu.lan@intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	lenb@kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org, fcr@adinet.com.uy, l@dorileo.org,
	"Zheng, Lv" <lv.zheng@intel.com>,
	robert.moore@intel.com
Subject: Re: [PATCH V2] ACPI/Battery: Add a _BIX quirk for NEC LZ750/LS
Date: Wed, 15 Jan 2014 14:47:21 +0000	[thread overview]
Message-ID: <20140115144720.GA23218@srcf.ucam.org> (raw)
In-Reply-To: <52D69E57.5020208@intel.com>

On Wed, Jan 15, 2014 at 10:42:31PM +0800, Lan Tianyu wrote:
> diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
> index fbf1ace..e98fa83 100644
> --- a/drivers/acpi/battery.c
> +++ b/drivers/acpi/battery.c
> @@ -770,7 +770,7 @@ static int acpi_battery_add(struct acpi_device *device)
>         device->driver_data = battery;
>         mutex_init(&battery->lock);
>         mutex_init(&battery->sysfs_lock);
> -       if (acpi_has_method(battery->device->handle, "_BIX"))
> +       if (acpi_evaluate_object(device->handle, "_BIX", NULL, &buffer);)
>                 set_bit(ACPI_BATTERY_XINFO_PRESENT, &battery->flags);

Doesn't acpi_evaluate_object() return 0 on success? I think:

if (ACPI_SUCESS(acpi_evaluate_object(device->handle, "_BIX", NULL, 
&buffer))

But maybe we should check for existence first and give an FW_BUG message 
to indicate an invalid _BIX?

-- 
Matthew Garrett | mjg59@srcf.ucam.org

  reply	other threads:[~2014-01-15 14:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-06 14:50 [PATCH V2] ACPI/Battery: Add a _BIX quirk for NEC LZ750/LS Lan Tianyu
2014-01-06 17:59 ` Dmitry Torokhov
2014-01-06 22:25   ` Rafael J. Wysocki
2014-01-14 16:06     ` Matthew Garrett
2014-01-14 21:37       ` Rafael J. Wysocki
2014-01-14 21:24         ` Matthew Garrett
2014-01-14 22:17           ` Rafael J. Wysocki
2014-01-15 14:42             ` Lan Tianyu
2014-01-15 14:47               ` Matthew Garrett [this message]
2014-01-15 15:06                 ` Lan Tianyu
2014-01-15 16:48                   ` Moore, Robert
2014-01-15 16:48                     ` Moore, Robert
2014-01-15  6:17         ` Robert Hancock

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=20140115144720.GA23218@srcf.ucam.org \
    --to=mjg59@srcf.ucam.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=fcr@adinet.com.uy \
    --cc=l@dorileo.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lv.zheng@intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=robert.moore@intel.com \
    --cc=tianyu.lan@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.