Re: [PATCH] DS2781 Maxim Stand-Alone Fuel Gauge battery and w1slave drivers

From: Evgeniy Polyakov
Date: Wed Feb 29 2012 - 13:53:13 EST


Hi Renata

On Wed, Feb 29, 2012 at 02:58:53PM +0100, Renata Sayakhova (rsayakhova@xxxxxxxxx) wrote:
>
> Signed-off-by: Renata Sayakhova <rsayakhova@xxxxxxxxx>

Patch looks good except this weird function

> +static inline int ds2781_battery_io(struct ds2781_device_info *dev_info,
> + char *buf, int addr, size_t count, int io)
> +{
> + if (dev_info->mutex_holder == current)
> + return w1_ds2781_io_nolock(dev_info->w1_dev, buf, addr,
> + count, io);
> + else
> + return w1_ds2781_io(dev_info->w1_dev, buf, addr, count, io);
> +}

Who in the stack can run away holding mutex?

--
Evgeniy Polyakov
--
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/