From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [RFC v2 3/5] i2c: Add of_i2c_get_adapter() function Date: Wed, 25 Apr 2012 18:39:37 +0200 Message-ID: <20120425163937.GA19862@avionic-0098.adnet.avionic-design.de> References: <1335347102-14905-1-git-send-email-thierry.reding@avionic-design.de> <1335347102-14905-4-git-send-email-thierry.reding@avionic-design.de> <4F981A09.2020304@wwwdotorg.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1668250758527344080==" Return-path: In-Reply-To: <4F981A09.2020304-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Stephen Warren Cc: David Airlie , devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Mark Brown , Wolfram Sang , dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, Grant Likely , Olof Johansson , iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Rob Herring , Ben Dooks , Colin Cross , linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Terje =?utf-8?Q?Bergstr=C3=B6m?= , Jon Mayo , Liam Girdwood List-Id: linux-i2c@vger.kernel.org --===============1668250758527344080== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="J/dobhs11T7y2rNN" Content-Disposition: inline --J/dobhs11T7y2rNN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Stephen Warren wrote: > On 04/25/2012 03:45 AM, Thierry Reding wrote: > > This function resolves an OF device node to an I2C adapter registered > > with the I2C core. >=20 > I think this is doing the same thing as a patch I posted recently: > http://www.spinics.net/lists/linux-i2c/msg07808.html I wasn't aware of that patch. > What's the advantage of one way over the other? Both are fine I think. Your version is shorter but mine may be a little faster since it doesn't iterate over all devices on the bus. Since the lookup doesn't happen very frequently this isn't much of an issue. Thierry --J/dobhs11T7y2rNN Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAk+YKMkACgkQZ+BJyKLjJp8U8ACfRGSl5S8e17I39QI0JMyvAUAJ VWIAn1WROtroicW4gBj2GJOgeqDG5YZi =jYX7 -----END PGP SIGNATURE----- --J/dobhs11T7y2rNN-- --===============1668250758527344080== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ iommu mailing list iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org https://lists.linuxfoundation.org/mailman/listinfo/iommu --===============1668250758527344080==--