Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36ac2f32 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by Mauro Carvalho Chehab
Browse files

[media] media: rc: remove unneeded mutex in rc_register_device



Access to dev->initialized is atomic and dev->initialized isn't
accessed in any other code protected by this mutex.
Therefore we don't need to get the mutex here.

Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent a403ceeb
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1492,9 +1492,7 @@ int rc_register_device(struct rc_dev *dev)
	}

	/* Allow the RC sysfs nodes to be accessible */
	mutex_lock(&dev->lock);
	atomic_set(&dev->initialized, 1);
	mutex_unlock(&dev->lock);

	IR_dprintk(1, "Registered rc%u (driver: %s, remote: %s, mode %s)\n",
		   dev->minor,