diff mbox

[9/9] driver/gpio: gpio-omap: fix incompatible pointer type

Message ID 1452885673-30891-10-git-send-email-anders.roxell@linaro.org
State New
Headers show

Commit Message

Anders Roxell Jan. 15, 2016, 7:21 p.m. UTC
Used multi_v7_defconfig+PREEMPT_RT_FULL=y and this caused a compilation
warning without this fix:
../drivers/gpio/gpio-omap.c: In function 'omap_gpio_runtime_resume':
../drivers/gpio/gpio-omap.c:1398:4: warning: passing argument 1 of
    'rt_spin_unlock' from incompatible pointer type [enabled by default]
In file included from ../include/linux/spinlock.h:290:0,
                 from ../include/linux/seqlock.h:35,
                 from ../include/linux/time.h:5,
                 from ../include/linux/stat.h:18,
                 from ../include/linux/module.h:10,
                 from ../drivers/gpio/gpio-omap.c:16:
../include/linux/spinlock_rt.h:24:56: note: expected
    'struct spinlock_t *' but argument is of type 'struct raw_spinlock_t *'

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>

---
 drivers/gpio/gpio-omap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Anders Roxell Jan. 20, 2016, 9:29 p.m. UTC | #1
On 18 January 2016 at 15:29, Grygorii Strashko <grygorii.strashko@ti.com> wrote:
> On 01/15/2016 09:21 PM, Anders Roxell wrote:

>> Used multi_v7_defconfig+PREEMPT_RT_FULL=y and this caused a compilation

>> warning without this fix:

>> ../drivers/gpio/gpio-omap.c: In function 'omap_gpio_runtime_resume':

>> ../drivers/gpio/gpio-omap.c:1398:4: warning: passing argument 1 of

>>      'rt_spin_unlock' from incompatible pointer type [enabled by default]

>> In file included from ../include/linux/spinlock.h:290:0,

>>                   from ../include/linux/seqlock.h:35,

>>                   from ../include/linux/time.h:5,

>>                   from ../include/linux/stat.h:18,

>>                   from ../include/linux/module.h:10,

>>                   from ../drivers/gpio/gpio-omap.c:16:

>> ../include/linux/spinlock_rt.h:24:56: note: expected

>>      'struct spinlock_t *' but argument is of type 'struct raw_spinlock_t *'

>>

>> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>

>> ---

>>   drivers/gpio/gpio-omap.c | 2 +-

>>   1 file changed, 1 insertion(+), 1 deletion(-)

>>

>> diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c

>> index 004888b..f3028e7 100644

>> --- a/drivers/gpio/gpio-omap.c

>> +++ b/drivers/gpio/gpio-omap.c

>> @@ -1395,7 +1395,7 @@ static int omap_gpio_runtime_resume(struct device *dev)

>>               if (c != bank->context_loss_count) {

>>                       omap_gpio_restore_context(bank);

>>               } else {

>> -                     spin_unlock_irqrestore(&bank->lock, flags);

>> +                     raw_spin_unlock_irqrestore(&bank->lock, flags);

>>                       return 0;

>>               }

>>       }

>>

>

> This patch is not required since I've asked Sebastian to revert patch

> caused this warning.


Yes your right, I've missed that.

Cheers,
Anders

>

> --

> regards,

> -grygorii

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 004888b..f3028e7 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1395,7 +1395,7 @@  static int omap_gpio_runtime_resume(struct device *dev)
 		if (c != bank->context_loss_count) {
 			omap_gpio_restore_context(bank);
 		} else {
-			spin_unlock_irqrestore(&bank->lock, flags);
+			raw_spin_unlock_irqrestore(&bank->lock, flags);
 			return 0;
 		}
 	}