From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755853Ab1HVJBV (ORCPT ); Mon, 22 Aug 2011 05:01:21 -0400 Received: from mga03.intel.com ([143.182.124.21]:6481 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754760Ab1HVJBN (ORCPT ); Mon, 22 Aug 2011 05:01:13 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.68,261,1312182000"; d="scan'208";a="41009874" Date: Mon, 22 Aug 2011 11:03:13 +0200 From: Samuel Ortiz To: Lars-Peter Clausen Cc: Mark Brown , linux-kernel@vger.kernel.org, patches@opensource.wolfsonmicro.com Subject: Re: [PATCH] mfd: Convert pcf50633 to use new register map API Message-ID: <20110822090313.GD4607@sortiz-mobl> References: <1312602304-21504-1-git-send-email-broonie@opensource.wolfsonmicro.com> <4E3F5817.2090405@metafoo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E3F5817.2090405@metafoo.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Lars, On Mon, Aug 08, 2011 at 05:29:27AM +0200, Lars-Peter Clausen wrote: > > > #include > > > [...] > > /* 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/