From: Paul Mundt <paul.mundt@nokia.com>
To: linux-omap-open-source@linux.omap.com
Subject: [PATCH] ARM: OMAP: STI netlink sem2mutex conversion.
Date: Thu, 4 May 2006 16:36:21 +0300 [thread overview]
Message-ID: <20060504133621.GA18545@nokia.com> (raw)
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)
next reply other threads:[~2006-05-04 13:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-04 13:36 Paul Mundt [this message]
2006-05-04 14:01 ` [PATCH] ARM: OMAP: STI netlink sem2mutex conversion Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060504133621.GA18545@nokia.com \
--to=paul.mundt@nokia.com \
--cc=linux-omap-open-source@linux.omap.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox