linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Jonathan Cameron <jic23@cam.ac.uk>, linux-iio@vger.kernel.org
Subject: Re: [PATCH 1/2] iio: Add iio_device_get()
Date: Tue, 29 May 2012 09:41:35 +0200	[thread overview]
Message-ID: <4FC47DAF.5040506@metafoo.de> (raw)
In-Reply-To: <4FC28A49.1060205@kernel.org>

On 05/27/2012 10:10 PM, Jonathan Cameron wrote:
> On 05/25/2012 05:29 PM, Lars-Peter Clausen wrote:
>> On 05/21/2012 10:21 AM, Lars-Peter Clausen wrote:
>>> This patch add the iio_device_get() function, which increases the reference
>>> count of a iio device. The matching function to decrease the reference count -
>>> iio_device_put() - already exists.
>>>
>>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>>
>> Hi Jonathan,
>>
>> Are you OK with these two patches?
> Sorry, was a somewhat mad week..
> 
> Acked-by: Jonathan Cameron <jic23@kernel.org>
> for both of them.

Thanks. Btw. these touch only out-of-staging IIO code. Now that the
out-of-staging code is in mainline, what's the plan for the patch flow? Are
you going to collect the patches and send them to Linus or should they still
go through the staging tree?

- Lars

>>
>> Thanks,
>> - Lars
>>
>>> ---
>>>  include/linux/iio/iio.h |   11 +++++++++++
>>>  1 file changed, 11 insertions(+)
>>>
>>> diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
>>> index 3a4f6a3..3238fa3 100644
>>> --- a/include/linux/iio/iio.h
>>> +++ b/include/linux/iio/iio.h
>>> @@ -438,6 +438,17 @@ static inline struct iio_dev *dev_to_iio_dev(struct device *dev)
>>>  	return container_of(dev, struct iio_dev, dev);
>>>  }
>>>  
>>> +/**
>>> + * iio_device_get() - increment reference count for the device
>>> + * @indio_dev: IIO device structure
>>> + *
>>> + * Returns: The passed IIO device
>>> + **/
>>> +static inline struct iio_dev *iio_device_get(struct iio_dev *indio_dev)
>>> +{
>>> +	return indio_dev ? dev_to_iio_dev(get_device(&indio_dev->dev)) : NULL;
>>> +}
>>> +
>>>  /* Can we make this smaller? */
>>>  #define IIO_ALIGN L1_CACHE_BYTES
>>>  /**
>>
> 

  reply	other threads:[~2012-05-29  7:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-21  8:21 [PATCH 1/2] iio: Add iio_device_get() Lars-Peter Clausen
2012-05-21  8:21 ` [PATCH 2/2] iio:inkern: Use iio_device_{get,put} Lars-Peter Clausen
2012-05-25 16:29 ` [PATCH 1/2] iio: Add iio_device_get() Lars-Peter Clausen
2012-05-27 20:10   ` Jonathan Cameron
2012-05-29  7:41     ` Lars-Peter Clausen [this message]
2012-05-29  7:44       ` Jonathan Cameron
  -- strict thread matches above, loose matches on Subject: below --
2012-06-04  8:50 Lars-Peter Clausen

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=4FC47DAF.5040506@metafoo.de \
    --to=lars@metafoo.de \
    --cc=jic23@cam.ac.uk \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    /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).