All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "Lars-Peter Clausen" <lars@metafoo.de>,
	linux-iio@vger.kernel.org, Martin Liska <marxin.liska@gmail.com>,
	Zhang Rui <rui.zhang@intel.com>
Subject: Re: [PATCH V5] iio: acpi: Add ACPI0008 ALS driver
Date: Mon, 30 Sep 2013 01:44:22 +0200	[thread overview]
Message-ID: <201309300144.22295.marex@denx.de> (raw)
In-Reply-To: <522C8450.3080504@kernel.org>

Dear Jonathan Cameron,

[...]

> >> +static void acpi_als_notify(struct acpi_device *device, u32 event)
> >> +{
> >> +    struct iio_dev *iio = acpi_driver_data(device);
> >> +    struct acpi_als *als = iio_priv(iio);
> >> +    s64 time_ns = iio_get_time_ns();
> >> +
> >> +    mutex_lock(&als->lock);
> > 
> > Hm, so you lock the mutex here and unlock the mutex
> > acpi_als_trigger_handler. This really needs some explanation. You also
> > need to implement validate_trigger and validate_device callbacks to make
> > sure that this trigger is only used with this device and vice versa.
> 
> It may need some annotation as well to avoid various checks picking this
> up.

Do you have any particular one in mind?

[...]

> >> +    evt_buffer = devm_kzalloc(dev, evt_buffer_size, GFP_KERNEL);
> >> +    if (!evt_buffer)
> >> +        return -ENOMEM;
> >> +
> >> +    iio = iio_device_alloc(sizeof(*als));
> > 
> > devm_...
> 
> Also for the trigger allocation.

I'm on 3.12.0-rc2 (next 20130927), don't see either of them existing.

Best regards,
Marek Vasut

  reply	other threads:[~2013-09-29 23:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-20 23:58 [PATCH V5] iio: acpi: Add ACPI0008 ALS driver Marek Vasut
2013-09-05 15:04 ` Marek Vasut
2013-09-05 19:15 ` Lars-Peter Clausen
2013-09-08 14:06   ` Jonathan Cameron
2013-09-29 23:44     ` Marek Vasut [this message]
2013-09-29 23:41   ` Marek Vasut
2013-09-30  8:37     ` Jonathan Cameron

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=201309300144.22295.marex@denx.de \
    --to=marex@denx.de \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=marxin.liska@gmail.com \
    --cc=rui.zhang@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.