From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753130AbcCAUij (ORCPT ); Tue, 1 Mar 2016 15:38:39 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33322 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751017AbcCAUih (ORCPT ); Tue, 1 Mar 2016 15:38:37 -0500 MIME-Version: 1.0 In-Reply-To: <20160301203015.GC1488@katana> References: <1455810794-3188-1-git-send-email-daniel.baluta@intel.com> <1455810794-3188-9-git-send-email-daniel.baluta@intel.com> <20160301203015.GC1488@katana> Date: Tue, 1 Mar 2016 22:38:35 +0200 X-Google-Sender-Auth: lfDbFsEiuXw2D2Y8iFvn30anOe8 Message-ID: Subject: Re: [RFC PATCH 8/9] i2c: i2c-mux: Allow for NULL select callback From: Daniel Baluta To: Wolfram Sang Cc: Daniel Baluta , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , "linux-iio@vger.kernel.org" , Linux Kernel Mailing List , linux-i2c@vger.kernel.org, Lucas De Marchi , Srinivas Pandruvada , Ge Gao , Adriana Reus , Crt Mori , Michael Welling Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 1, 2016 at 10:30 PM, Wolfram Sang wrote: > On Thu, Feb 18, 2016 at 05:53:13PM +0200, Daniel Baluta wrote: >> From: Adriana Reus >> >> Add a check in i2c_mux_master_xfer before calling the select callback. >> This is necessary so that NULL callbacks can be safely registered. >> >> Signed-off-by: Adriana Reus >> Signed-off-by: Daniel Baluta > > Hmm, rather than supporting that in the core, I'd prefer to have the > driver pass an empty function instead. Then, in the driver, we can have > a comment explaining the special situation. Agree. This seems a better idea forcing the user to explain the situation :).