lkml.org 
[lkml]   [2015]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.19.y-ckt 231/251] mtd: dc21285: use raw spinlock functions for nw_gpio_lock
    Date
    3.19.8-ckt4 -stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>

    commit e5babdf928e5d0c432a8d4b99f20421ce14d1ab6 upstream.

    Since commit bd31b85960a7 (which is in 3.2-rc1) nw_gpio_lock is a raw spinlock
    that needs usage of the corresponding raw functions.

    This fixes:

    drivers/mtd/maps/dc21285.c: In function 'nw_en_write':
    drivers/mtd/maps/dc21285.c:41:340: warning: passing argument 1 of 'spinlock_check' from incompatible pointer type
    spin_lock_irqsave(&nw_gpio_lock, flags);

    In file included from include/linux/seqlock.h:35:0,
    from include/linux/time.h:5,
    from include/linux/stat.h:18,
    from include/linux/module.h:10,
    from drivers/mtd/maps/dc21285.c:8:
    include/linux/spinlock.h:299:102: note: expected 'struct spinlock_t *' but argument is of type 'struct raw_spinlock_t *'
    static inline raw_spinlock_t *spinlock_check(spinlock_t *lock)
    ^
    drivers/mtd/maps/dc21285.c:43:25: warning: passing argument 1 of 'spin_unlock_irqrestore' from incompatible pointer type
    spin_unlock_irqrestore(&nw_gpio_lock, flags);
    ^
    In file included from include/linux/seqlock.h:35:0,
    from include/linux/time.h:5,
    from include/linux/stat.h:18,
    from include/linux/module.h:10,
    from drivers/mtd/maps/dc21285.c:8:
    include/linux/spinlock.h:370:91: note: expected 'struct spinlock_t *' but argument is of type 'struct raw_spinlock_t *'
    static inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)

    Fixes: bd31b85960a7 ("locking, ARM: Annotate low level hw locks as raw")
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Brian Norris <computersforpeace@gmail.com>
    Signed-off-by: Kamal Mostafa <kamal@canonical.com>
    ---
    drivers/mtd/maps/dc21285.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/drivers/mtd/maps/dc21285.c b/drivers/mtd/maps/dc21285.c
    index f8a7dd1..70a3db3 100644
    --- a/drivers/mtd/maps/dc21285.c
    +++ b/drivers/mtd/maps/dc21285.c
    @@ -38,9 +38,9 @@ static void nw_en_write(void)
    * we want to write a bit pattern XXX1 to Xilinx to enable
    * the write gate, which will be open for about the next 2ms.
    */
    - spin_lock_irqsave(&nw_gpio_lock, flags);
    + raw_spin_lock_irqsave(&nw_gpio_lock, flags);
    nw_cpld_modify(CPLD_FLASH_WR_ENABLE, CPLD_FLASH_WR_ENABLE);
    - spin_unlock_irqrestore(&nw_gpio_lock, flags);
    + raw_spin_unlock_irqrestore(&nw_gpio_lock, flags);

    /*
    * let the ISA bus to catch on...
    --
    1.9.1


    \
     
     \ /
      Last update: 2015-07-16 03:41    [W:4.121 / U:0.296 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site