Re: [PATCH] mfd: Convert pcf50633 to use new register map API

From: Samuel Ortiz
Date: Mon Aug 22 2011 - 05:01:25 EST


Hi Lars,

On Mon, Aug 08, 2011 at 05:29:27AM +0200, Lars-Peter Clausen wrote:
>
> > #include <linux/mfd/pcf50633/core.h>
> >
> [...]
> > /* Read a block of up to 32 regs */
> > int pcf50633_read_block(struct pcf50633 *pcf, u8 reg,
> > int nr_regs, u8 *data)
> > {
> > - int ret;
> > -
> > - mutex_lock(&pcf->lock);
> > - ret = __pcf50633_read(pcf, reg, nr_regs, data);
> > - mutex_unlock(&pcf->lock);
> > -
> > - return ret;
> > + return regmap_raw_read(pcf->regmap, reg, data, nr_regs);
> > }
> > EXPORT_SYMBOL_GPL(pcf50633_read_block);
>
> There are callers which expect pcf50633_read_block to return the number of
> bytes read. We could change the wrapper to return nr_regs if regmap_raw_read
> returns 0. But I guess it is best to just update the callers. Incremental patch
> which does this at the end of the mail.
I'd like to apply Mark's patch and yours. Could you please remove the
unnecesary printk in your patch and I'll go ahead.

Cheers,
Samuel.

--
Intel Open Source Technology Centre
http://oss.intel.com/
--
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/