Thread (6 messages) flat view 6 messages, 4 authors, 2011-03-06

staging: iio: ak8975: make gpio platdata mandatory

From: Sergei Shtylyov <hidden>
Date: 2011-03-04 11:50:23

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<redacted>
[...]
quoted hunk ↗ jump to hunk
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.
quoted hunk ↗ jump to hunk
  };

  /*
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help