Messages in this thread | | | Date | Fri, 12 Oct 2012 15:26:09 +0900 | From | Mark Brown <> | Subject | Re: [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.
| |