lkml.org 
[lkml]   [2012]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] regmap : make lock/unlock functions customizable.
On Mon, Oct 01, 2012 at 11:31:04PM +0200, ciminaghi@gnudd.com wrote:
> From: Davide Ciminaghi <ciminaghi@gnudd.com>
>
> It is sometimes convenient for a regmap user to override the standard
> regmap lock/unlock functions with custom functions.

This looks good overall but...

> -static void regmap_lock_mutex(struct regmap *map)
> +static void regmap_lock_mutex(void *__map)
> {
> + struct regmap *map = (struct regmap *)__map;
> mutex_lock(&map->mutex);

...you should never need to cast away from or to void, if you do there's
a bug somewhere.


\
 
 \ /
  Last update: 2012-10-12 09:01    [W:0.044 / U:0.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site