From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751586Ab3CATWS (ORCPT ); Fri, 1 Mar 2013 14:22:18 -0500 Received: from sauhun.de ([89.238.76.85]:54360 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750779Ab3CATWQ (ORCPT ); Fri, 1 Mar 2013 14:22:16 -0500 Date: Fri, 1 Mar 2013 20:22:13 +0100 From: Wolfram Sang To: Doug Anderson Cc: linux-i2c@vger.kernel.org, Mark Brown , Kukjin Kim , Olof Johansson , Thomas Abraham , Padmavathi Venna , Ben Dooks , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Haojian Zhuang , Arnd Bergmann , Sylwester Nawrocki , linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 1/2] i2c-core: dt: Pick i2c bus number from i2c alias if present Message-ID: <20130301192212.GA379@the-dreams.de> References: <1360630085-26874-1-git-send-email-dianders@chromium.org> <1362157052-16738-1-git-send-email-dianders@chromium.org> <1362157052-16738-2-git-send-email-dianders@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1362157052-16738-2-git-send-email-dianders@chromium.org> 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 On Fri, Mar 01, 2013 at 08:57:31AM -0800, Doug Anderson wrote: > This allows you to get the equivalent functionality of > i2c_add_numbered_adapter() with all data in the device tree and no > special case code in your driver. This is a common device tree > technique. > > For quick reference, the FDT syntax for using an alias to provide an > ID looks like: > aliases { > i2c0 = &i2c_0; > i2c1 = &i2c_1; > }; > > Signed-off-by: Doug Anderson Thanks, applied. I'll try to get it into 3.9. > + /* Handled by wrappers */ > + if (WARN_ON(adap->nr == -1)) > + return -EINVAL; I removed this check, though. We know our callers, all static. Thanks, Wolfram