Re: [PATCH] regmap : make lock/unlock functions customizable.

From: Mark Brown
Date: Fri Oct 12 2012 - 02:26:15 EST


On Mon, Oct 01, 2012 at 11:31:04PM +0200, ciminaghi@xxxxxxxxx wrote:
> From: Davide Ciminaghi <ciminaghi@xxxxxxxxx>
>
> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/