From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Mathias Nyman <mathias.nyman@linux.intel.com>,
Grant Likely <grant.likely@secretlab.ca>,
linux-acpi@vger.kernel.org
Subject: Re: [PATCH 2/2] gpio / ACPI: add support for GPIO operation regions
Date: Fri, 13 Sep 2013 20:36:15 +0300 [thread overview]
Message-ID: <20130913173615.GG7393@intel.com> (raw)
In-Reply-To: <CAHp75Vcec5MiGMUiusJhAmG6-R63OUZSXZPzafJzP6dC13Dgnw@mail.gmail.com>
On Fri, Sep 13, 2013 at 06:55:11PM +0300, Andy Shevchenko wrote:
> On Fri, Sep 13, 2013 at 6:14 PM, Mika Westerberg
> <mika.westerberg@linux.intel.com> wrote:
> > GPIO operation regions is a new feature introduced in ACPI 5.0
> > specification. In practise it means that now ASL code can toggle GPIOs with
> > the help of the OS GPIO driver.
>
> []
>
> > void acpi_gpiochip_add(struct gpio_chip *chip)
> > {
> > + struct acpi_gpio_chip_data *data;
> > + acpi_handle handle;
> > + acpi_status status;
> > +
> > + handle = ACPI_HANDLE(chip->dev);
> > + if (!handle)
> > + return;
> > +
> > + data = kzalloc(sizeof(*data), GFP_KERNEL);
>
> May we use devm_kzalloc here?
The ACPI event handling code still uses kzalloc() and we need to call
acpi_gpiolib_remove() anyway (which undoes this), so I think we should
stick with kzalloc() now.
next prev parent reply other threads:[~2013-09-13 17:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-13 15:14 [PATCH 1/2] gpio / ACPI: register to ACPI events automatically Mika Westerberg
2013-09-13 15:14 ` [PATCH 2/2] gpio / ACPI: add support for GPIO operation regions Mika Westerberg
2013-09-13 15:55 ` Andy Shevchenko
2013-09-13 17:36 ` Mika Westerberg [this message]
2013-09-14 0:10 ` Zheng, Lv
2013-09-15 6:51 ` Mika Westerberg
2013-09-16 0:46 ` Zheng, Lv
2013-09-16 1:21 ` Zheng, Lv
2013-09-16 8:10 ` Mika Westerberg
2013-09-16 23:35 ` Zheng, Lv
2013-09-17 8:37 ` Mika Westerberg
2013-09-24 0:47 ` Zheng, Lv
2013-09-24 4:59 ` Mika Westerberg
2013-09-20 19:21 ` Linus Walleij
2013-09-23 10:48 ` Mika Westerberg
2013-09-20 19:08 ` [PATCH 1/2] gpio / ACPI: register to ACPI events automatically Linus Walleij
2013-09-23 10:52 ` Mika Westerberg
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=20130913173615.GG7393@intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=grant.likely@secretlab.ca \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathias.nyman@linux.intel.com \
--cc=rafael.j.wysocki@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).