From: sshtylyov@mvista.com (Sergei Shtylyov)
To: linux-arm-kernel@lists.infradead.org
Subject: staging: iio: ak8975: make gpio platdata mandatory
Date: Fri, 04 Mar 2011 14:50:23 +0300 [thread overview]
Message-ID: <4D70D1FF.8090302@ru.mvista.com> (raw)
In-Reply-To: <AANLkTik1MSkfyb36AHUOG+OK=h=rt1D4sbpyUiYg07dT@mail.gmail.com>
Hello.
On 04-03-2011 8:34, Naveen Krishna Ch wrote:
> Issue:
> For some architectures CONFIG_GENERIC_GPIO is defined,
> leaving irq_to_gpio undefined. Causing build break.
> Solution:
> 1. Some architechtures define irq_to_gpio in machine specific code.
> 2. Make GPIO in platdata mandatory.
> Signed-off-by: Naveen Krishna Ch<ch.naveen@samsung.com>
[...]
> diff --git a/drivers/staging/iio/magnetometer/ak8975.c
> b/drivers/staging/iio/magnetometer/ak8975.c
> index 80c0f41..8456d1f 100644
> --- a/drivers/staging/iio/magnetometer/ak8975.c
> +++ b/drivers/staging/iio/magnetometer/ak8975.c
> @@ -98,7 +98,6 @@ struct ak8975_data {
> unsigned long mode;
> u8 reg_cache[AK8975_MAX_REGS];
> int eoc_gpio;
> - int eoc_irq;
Your patch seems to be whitespace damaged, i.e. all tabs replaced by spaces.
> };
>
> /*
> @@ -453,12 +452,13 @@ static int ak8975_probe(struct i2c_client *client,
> mutex_init(&data->lock);
>
> /* Grab and set up the supplied GPIO. */
> - data->eoc_irq = client->irq;
> pdata = client->dev.platform_data;
> if (pdata)
> data->eoc_gpio = pdata->gpio;
> - else
> - data->eoc_gpio = irq_to_gpio(client->irq);
> + else {
> + else {
Have you tried to compile this?
WBR, Sergei
prev parent reply other threads:[~2011-03-04 11:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-04 5:34 staging: iio: ak8975: make gpio platdata mandatory Naveen Krishna Ch
2011-03-04 5:51 ` Kyungmin Park
2011-03-06 0:31 ` Naveen Krishna Ch
2011-03-06 0:58 ` Russell King - ARM Linux
2011-03-06 1:40 ` Naveen Krishna Ch
2011-03-04 11:50 ` Sergei Shtylyov [this message]
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=4D70D1FF.8090302@ru.mvista.com \
--to=sshtylyov@mvista.com \
--cc=linux-arm-kernel@lists.infradead.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.