[media] media: rc: nuvoton-cir: remove unneeded lock
authorHeiner Kallweit <hkallweit1@gmail.com>
Thu, 29 Oct 2015 21:19:19 +0000 (19:19 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 19 Nov 2015 11:34:02 +0000 (09:34 -0200)
chip_major / chip_minor are accessed sequentially in probe only.
Therefore no lock is needed.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/rc/nuvoton-cir.c

index 3d9a4cf29919d2e161250ebb0029ec1e506a6f77..4d8e12f2247decff720c9f046a35ae14b34a01c8 100644 (file)
@@ -227,7 +227,6 @@ static void cir_wake_dump_regs(struct nvt_dev *nvt)
 /* detect hardware features */
 static int nvt_hw_detect(struct nvt_dev *nvt)
 {
-       unsigned long flags;
        u8 chip_major, chip_minor;
        char chip_id[12];
        bool chip_unknown = false;
@@ -279,10 +278,8 @@ static int nvt_hw_detect(struct nvt_dev *nvt)
 
        nvt_efm_disable(nvt);
 
-       spin_lock_irqsave(&nvt->nvt_lock, flags);
        nvt->chip_major = chip_major;
        nvt->chip_minor = chip_minor;
-       spin_unlock_irqrestore(&nvt->nvt_lock, flags);
 
        return 0;
 }