OSDN Git Service

mtip32xx: avoid using semaphores
authorArnd Bergmann <arnd@arndb.de>
Mon, 10 Dec 2018 21:34:39 +0000 (22:34 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 10 Dec 2018 21:44:56 +0000 (14:44 -0700)
commite4025e46f093d4549d3043c2c54d444cec480d2b
treed96d7141ef0bdcc4147fb55530b2d9857f7a93a7
parent6f75723190d88e1319bea623bfe0292bf3917965
mtip32xx: avoid using semaphores

The "cmd_slot_unal" semaphore is never used in a blocking way
but only as an atomic counter. Change the code to using
atomic_dec_if_positive() as a better API.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/mtip32xx/mtip32xx.c
drivers/block/mtip32xx/mtip32xx.h