ARM: OMAP: STI netlink sem2mutex conversion.
Subsystems (2)
PATCH 1/1 ARM: OMAP: STI netlink sem2mutex conversion.
Simple update of the STI netlink interface for the mutex API.
Signed-off-by Paul Mundt <[email protected]>
---
arch/arm/plat-omap/sti/sti-netlink.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
arch/arm/plat-omap/sti/sti-netlink.c +5 -4
@@ -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 <[email protected]> * * 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 selse kfree_skb (skb); -up (&sti_netlink_sem); +mutex_unlock (&sti_netlink_mutex); }static int __init sti_netlink_init (void )
Quoted 1 line · Paul Mundt
Simple update of the STI netlink interface for the mutex API.
Pushed.
Tony