public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: rc: remove unneeded mutex in rc_register_device
@ 2016-03-16 18:53 Heiner Kallweit
  2016-03-16 19:33 ` Vladimir Zapolskiy
  0 siblings, 1 reply; 3+ messages in thread
From: Heiner Kallweit @ 2016-03-16 18:53 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-media

Access to dev->initialized is atomic, therefore we don't have to
protect it with a mutex.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/media/rc/rc-main.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index 4e9bbe7..68541b1 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -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,
-- 
2.7.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-16 21:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-16 18:53 [PATCH] media: rc: remove unneeded mutex in rc_register_device Heiner Kallweit
2016-03-16 19:33 ` Vladimir Zapolskiy
2016-03-16 21:24   ` Heiner Kallweit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox