提交 36ac2f32 编写于 作者: H Heiner Kallweit 提交者: Mauro Carvalho Chehab

[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: NHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 a403ceeb
...@@ -1492,9 +1492,7 @@ int rc_register_device(struct rc_dev *dev) ...@@ -1492,9 +1492,7 @@ int rc_register_device(struct rc_dev *dev)
} }
/* Allow the RC sysfs nodes to be accessible */ /* Allow the RC sysfs nodes to be accessible */
mutex_lock(&dev->lock);
atomic_set(&dev->initialized, 1); atomic_set(&dev->initialized, 1);
mutex_unlock(&dev->lock);
IR_dprintk(1, "Registered rc%u (driver: %s, remote: %s, mode %s)\n", IR_dprintk(1, "Registered rc%u (driver: %s, remote: %s, mode %s)\n",
dev->minor, dev->minor,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册