From: Jonathan Cameron <jic23@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Jonathan Cameron <jic23@cam.ac.uk>, linux-iio@vger.kernel.org
Subject: Re: [PATCH 08/24] staging:iio:adis16260_read_ring_data: Pass IIO device directly
Date: Sat, 12 May 2012 09:35:12 +0100 [thread overview]
Message-ID: <4FAE20C0.3050902@kernel.org> (raw)
In-Reply-To: <1336741127-29552-8-git-send-email-lars@metafoo.de>
On 05/11/2012 01:58 PM, Lars-Peter Clausen wrote:
> When calling adis16260_read_ring_data we pass the device struct of embedded in
> the IIO device only to look up the IIO device from the device struct again right
> away. This patch changes the code to pass the IIO device directly.
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
> ---
> drivers/staging/iio/gyro/adis16260_ring.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/iio/gyro/adis16260_ring.c b/drivers/staging/iio/gyro/adis16260_ring.c
> index 2528337..863f09a 100644
> --- a/drivers/staging/iio/gyro/adis16260_ring.c
> +++ b/drivers/staging/iio/gyro/adis16260_ring.c
> @@ -12,13 +12,12 @@
>
> /**
> * adis16260_read_ring_data() read data registers which will be placed into ring
> - * @dev: device associated with child of actual device (iio_dev or iio_trig)
> + * @indio_dev: The IIO device
> * @rx: somewhere to pass back the value read
> **/
> -static int adis16260_read_ring_data(struct device *dev, u8 *rx)
> +static int adis16260_read_ring_data(struct iio_dev *indio_dev, u8 *rx)
> {
> struct spi_message msg;
> - struct iio_dev *indio_dev = dev_get_drvdata(dev);
> struct adis16260_state *st = iio_priv(indio_dev);
> struct spi_transfer xfers[ADIS16260_OUTPUTS + 1];
> int ret;
> @@ -74,7 +73,7 @@ static irqreturn_t adis16260_trigger_handler(int irq, void *p)
> }
>
> if (!bitmap_empty(indio_dev->active_scan_mask, indio_dev->masklength) &&
> - adis16260_read_ring_data(&indio_dev->dev, st->rx) >= 0)
> + adis16260_read_ring_data(indio_dev, st->rx) >= 0)
> for (; i < bitmap_weight(indio_dev->active_scan_mask,
> indio_dev->masklength); i++)
> data[i] = be16_to_cpup((__be16 *)&(st->rx[i*2]));
next prev parent reply other threads:[~2012-05-12 8:35 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-11 12:58 [PATCH 01/24] iio: Add dev_to_iio_dev() helper function Lars-Peter Clausen
2012-05-11 12:58 ` [PATCH 02/24] iio: Use dev_to_iio_dev() Lars-Peter Clausen
2012-05-12 8:26 ` Jonathan Cameron
2012-05-11 12:58 ` [PATCH 03/24] staging:iio:adis16203_read_ring_data: Pass IIO device directly Lars-Peter Clausen
2012-05-12 8:28 ` Jonathan Cameron
2012-05-11 12:58 ` [PATCH 04/24] staging:iio:adis16204_read_ring_data: " Lars-Peter Clausen
2012-05-12 8:28 ` Jonathan Cameron
2012-05-11 12:58 ` [PATCH 05/24] staging:iio:adis16209_read_ring_data: " Lars-Peter Clausen
2012-05-12 8:30 ` Jonathan Cameron
2012-05-11 12:58 ` [PATCH 06/24] staging:iio:adis16240_read_ring_data: " Lars-Peter Clausen
2012-05-12 8:31 ` Jonathan Cameron
2012-05-11 12:58 ` [PATCH 07/24] staging:iio:__lis3l02dq_write_data_ready_config: " Lars-Peter Clausen
2012-05-12 8:34 ` Jonathan Cameron
2012-05-11 12:58 ` [PATCH 08/24] staging:iio:adis16260_read_ring_data: " Lars-Peter Clausen
2012-05-12 8:35 ` Jonathan Cameron [this message]
2012-05-11 12:58 ` [PATCH 09/24] staging:iio:ade7758_spi_read_burst: " Lars-Peter Clausen
2012-05-12 8:35 ` Jonathan Cameron
2012-05-11 12:58 ` [PATCH 10/24] staging:iio:adis16400_ring: " Lars-Peter Clausen
2012-05-12 8:36 ` Jonathan Cameron
2012-05-11 12:58 ` [PATCH 11/24] staging:iio:adc: Use dev_to_iio_dev() Lars-Peter Clausen
2012-05-12 8:40 ` Jonathan Cameron
2012-05-11 12:58 ` [PATCH 12/24] staging:iio:accel: " Lars-Peter Clausen
2012-05-12 8:43 ` Jonathan Cameron
2012-05-11 12:58 ` [PATCH 13/24] staging:iio:addac: " Lars-Peter Clausen
2012-05-12 8:44 ` Jonathan Cameron
2012-05-11 12:58 ` [PATCH 14/24] staging:iio:cdc: " Lars-Peter Clausen
2012-05-12 8:45 ` Jonathan Cameron
2012-05-11 12:58 ` [PATCH 15/24] staging:iio:dac: " Lars-Peter Clausen
2012-05-12 8:45 ` Jonathan Cameron
2012-05-11 12:58 ` [PATCH 16/24] staging:iio:frequency: " Lars-Peter Clausen
2012-05-12 8:46 ` Jonathan Cameron
2012-05-11 12:58 ` [PATCH 17/24] staging:iio:gyro: " Lars-Peter Clausen
2012-05-12 8:46 ` Jonathan Cameron
2012-05-11 12:58 ` [PATCH 18/24] staging:iio:impedance-analyzer: " Lars-Peter Clausen
2012-05-12 8:47 ` Jonathan Cameron
2012-05-11 12:58 ` [PATCH 19/24] staging:iio:imu: " Lars-Peter Clausen
2012-05-12 8:47 ` Jonathan Cameron
2012-05-11 12:58 ` [PATCH 20/24] staging:iio:light: " Lars-Peter Clausen
2012-05-12 8:48 ` Jonathan Cameron
2012-05-11 12:58 ` [PATCH 21/24] staging:iio:magnetometer: " Lars-Peter Clausen
2012-05-12 8:49 ` Jonathan Cameron
2012-05-11 12:58 ` [PATCH 22/24] staging:iio:resolver: " Lars-Peter Clausen
2012-05-12 8:49 ` Jonathan Cameron
2012-05-11 12:58 ` [PATCH 23/24] staging:iio:meter: " Lars-Peter Clausen
2012-05-12 8:50 ` Jonathan Cameron
2012-05-11 12:58 ` [PATCH 24/24] iio: Free up drvdata for driver usage Lars-Peter Clausen
2012-05-12 8:51 ` Jonathan Cameron
2012-05-12 9:08 ` [PATCH 01/24] iio: Add dev_to_iio_dev() helper function 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=4FAE20C0.3050902@kernel.org \
--to=jic23@kernel.org \
--cc=jic23@cam.ac.uk \
--cc=lars@metafoo.de \
--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 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.