public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: OMAP: STI netlink sem2mutex conversion.
@ 2006-05-04 13:36 Paul Mundt
  2006-05-04 14:01 ` Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Mundt @ 2006-05-04 13:36 UTC (permalink / raw)
  To: linux-omap-open-source

Simple update of the STI netlink interface for the mutex API.

Signed-off-by: Paul Mundt <paul.mundt@nokia.com>

---

 arch/arm/plat-omap/sti/sti-netlink.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/sti/sti-netlink.c b/arch/arm/plat-omap/sti/sti-netlink.c
index 45b8085..5593aee 100644
--- a/arch/arm/plat-omap/sti/sti-netlink.c
+++ b/arch/arm/plat-omap/sti/sti-netlink.c
@@ -1,7 +1,7 @@
 /*
  * OMAP STI/XTI communications interface via netlink socket.
  *
- * Copyright (C) 2004, 2005 Nokia Corporation
+ * Copyright (C) 2004, 2005, 2006 Nokia Corporation
  * Written by: Paul Mundt <paul.mundt@nokia.com>
  *
  * This file is subject to the terms and conditions of the GNU General Public
@@ -13,11 +13,12 @@ #include <linux/kernel.h>
 #include <linux/netlink.h>
 #include <linux/socket.h>
 #include <linux/skbuff.h>
+#include <linux/mutex.h>
 #include <net/sock.h>
 #include <asm/arch/sti.h>
 
 static struct sock *sti_sock;
-static DECLARE_MUTEX(sti_netlink_sem);
+static DEFINE_MUTEX(sti_netlink_mutex);
 
 enum {
 	STI_READ,
@@ -126,7 +127,7 @@ static void sti_netlink_receive(struct s
 {
 	struct sk_buff *skb;
 
-	if (down_trylock(&sti_netlink_sem))
+	if (!mutex_trylock(&sti_netlink_mutex))
 		return;
 
 	while ((skb = skb_dequeue(&sk->sk_receive_queue)))
@@ -135,7 +136,7 @@ static void sti_netlink_receive(struct s
 		else
 			kfree_skb(skb);
 
-	up(&sti_netlink_sem);
+	mutex_unlock(&sti_netlink_mutex);
 }
 
 static int __init sti_netlink_init(void)

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

* Re: [PATCH] ARM: OMAP: STI netlink sem2mutex conversion.
  2006-05-04 13:36 [PATCH] ARM: OMAP: STI netlink sem2mutex conversion Paul Mundt
@ 2006-05-04 14:01 ` Tony Lindgren
  0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2006-05-04 14:01 UTC (permalink / raw)
  To: Paul Mundt; +Cc: linux-omap-open-source

* Paul Mundt <paul.mundt@nokia.com> [060504 06:37]:
> Simple update of the STI netlink interface for the mutex API.

Pushed.

Tony

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

end of thread, other threads:[~2006-05-04 14:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-04 13:36 [PATCH] ARM: OMAP: STI netlink sem2mutex conversion Paul Mundt
2006-05-04 14:01 ` Tony Lindgren

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