[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6839489.KXLklQkzgz@wuerfel>
Date: Mon, 13 Jun 2016 17:48:34 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Binoy Jayan <binoy.jayan@...aro.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: gdm724x: Replace semaphore netlink with mutex
On Monday, June 13, 2016 7:59:20 PM CEST Binoy Jayan wrote:
>
> -#if defined(DEFINE_MUTEX)
> -static DEFINE_MUTEX(netlink_mutex);
> -#else
> -static struct semaphore netlink_mutex;
> -#define mutex_lock(x) down(x)
> -#define mutex_unlock(x) up(x)
> -#endif
> +static struct mutex netlink_mutex;
>
Good catch! I think the patch is correct, but the DEFINE_MUTEX
here seems preferable over the runtime mutex_init() call.
Arnd
Powered by blists - more mailing lists