Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757545AbcCXLGX (ORCPT ); Thu, 24 Mar 2016 07:06:23 -0400 Received: from mail.lysator.liu.se ([130.236.254.3]:34617 "EHLO mail.lysator.liu.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757149AbcCXLGN (ORCPT ); Thu, 24 Mar 2016 07:06:13 -0400 Message-ID: <56F3CA0E.60906@lysator.liu.se> Date: Thu, 24 Mar 2016 12:05:50 +0100 From: Peter Rosin User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Vladimir Zapolskiy CC: Wolfram Sang , Peter Rosin , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Peter Korsgaard , Guenter Roeck , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald , Antti Palosaari , Mauro Carvalho Chehab , Frank Rowand , Grant Likely , Adriana Reus , Srinivas Pandruvada , Krzysztof Kozlowski , Hans Verkuil , Nicholas Mc Guire , Olli Salonen , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-media@vger.kernel.org Subject: Re: [PATCH v2 1/8] i2c-mux: add common core data for every mux instance References: <1452009438-27347-1-git-send-email-peda@lysator.liu.se> <1452009438-27347-2-git-send-email-peda@lysator.liu.se> <56F3B86E.4050002@mentor.com> In-Reply-To: <56F3B86E.4050002@mentor.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1509 Lines: 49 Hi Vladimir, On 2016-03-24 10:50, Vladimir Zapolskiy wrote: > Hi Peter, > > On 05.01.2016 17:57, Peter Rosin wrote: >> From: Peter Rosin >> >> The initial core mux structure starts off small with only the parent >> adapter pointer, which all muxes have, and a priv pointer for mux >> driver private data. >> >> Add i2c_mux_alloc function to unify the creation of a mux. >> >> Where appropriate, pass around the mux core structure instead of the >> parent adapter or the driver private data. >> >> Remove the parent adapter pointer from the driver private data for all >> mux drivers. >> >> Signed-off-by: Peter Rosin > > is it still under review? If yes, please find one question from me below :) Yes, the series is still under review/testing, with an update planned in a week or so. > [snip] > >> @@ -196,21 +195,21 @@ static int i2c_arbitrator_probe(struct platform_device *pdev) >> dev_err(dev, "Cannot parse i2c-parent\n"); >> return -EINVAL; >> } >> - arb->parent = of_get_i2c_adapter_by_node(parent_np); >> + muxc->parent = of_find_i2c_adapter_by_node(parent_np); > > why do you prefer here to use "unlocked" version of API? > > Foe example would it be safe/possible to unload an I2C bus device driver > module or unbind I2C device itself in runtime? I think you ask why I change from of_get_i2c_... to of_find_i2c_..., and that change was not intentional. It was the result of a bad merge during an early rebase. Does that cover it? Cheers, Peter