Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752812AbdHBTM0 (ORCPT ); Wed, 2 Aug 2017 15:12:26 -0400 Received: from avon.wwwdotorg.org ([104.237.132.123]:40616 "EHLO avon.wwwdotorg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751923AbdHBTMX (ORCPT ); Wed, 2 Aug 2017 15:12:23 -0400 Subject: Re: [PATCH 2/2] i2c: mux: pinctrl: drop the idle_state member To: Peter Rosin Cc: linux-kernel@vger.kernel.org, Wolfram Sang , Stephen Warren , linux-i2c@vger.kernel.org References: <20170802072728.24586-1-peda@axentia.se> <20170802072728.24586-3-peda@axentia.se> From: Stephen Warren Message-ID: <15488723-e0ef-62b3-e62f-e74d12d8328d@wwwdotorg.org> Date: Wed, 2 Aug 2017 13:06:43 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170802072728.24586-3-peda@axentia.se> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 746 Lines: 20 On 08/02/2017 01:27 AM, Peter Rosin wrote: > The information is available elsewhere. > diff --git a/drivers/i2c/muxes/i2c-mux-pinctrl.c b/drivers/i2c/muxes/i2c-mux-pinctrl.c > static int i2c_mux_pinctrl_deselect(struct i2c_mux_core *muxc, u32 chan) > { > + return i2c_mux_pinctrl_select(muxc, muxc->num_adapters); > } > @@ -166,7 +162,7 @@ static int i2c_mux_pinctrl_probe(struct platform_device *pdev) > /* Do not add any adapter for the idle state (if it's there at all). */ > - for (i = 0; i < num_names - !!mux->state_idle; i++) { > + for (i = 0; i < num_names - !!muxc->deselect; i++) { I think that "num_names - !!muxc->deselect" could just be muxc->num_adapters? Otherwise, Reviewed-by: Stephen Warren