From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp2-g21.free.fr ([212.27.42.2]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1OGpdx-0006ht-IP for barebox@lists.infradead.org; Tue, 25 May 2010 08:37:47 +0000 From: =?utf-8?q?Eric=20B=C3=A9nard?= Date: Tue, 25 May 2010 10:37:33 +0200 Message-Id: <1274776657-6117-2-git-send-email-eric@eukrea.com> In-Reply-To: <1274776657-6117-1-git-send-email-eric@eukrea.com> References: <1274776657-6117-1-git-send-email-eric@eukrea.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v2 2/6] i2c: implement i2c_get_adapter() To: s.hauer@pengutronix.de Cc: barebox@lists.infradead.org RnJvbTogU2FzY2hhIEhhdWVyIDxzLmhhdWVyQHBlbmd1dHJvbml4LmRlPgoKU2lnbmVkLW9mZi1i eTogU2FzY2hhIEhhdWVyIDxzLmhhdWVyQHBlbmd1dHJvbml4LmRlPgpTaWduZWQtb2ZmLWJ5OiBF cmljIELDqW5hcmQgPGVyaWNAZXVrcmVhLmNvbT4KLS0tCnYyIDogYWRkIGkyY19nZXRfYWRhcHRl ciB0byBpbmNsdWRlL2kyYy9pMmMuaAoKIGRyaXZlcnMvaTJjL2kyYy5jIHwgICAyNCArKysrKysr KysrKysrKysrKysrKysrKy0KIGluY2x1ZGUvaTJjL2kyYy5oIHwgICAgMiArKwogMiBmaWxlcyBj aGFuZ2VkLCAyNSBpbnNlcnRpb25zKCspLCAxIGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL2Ry aXZlcnMvaTJjL2kyYy5jIGIvZHJpdmVycy9pMmMvaTJjLmMKaW5kZXggMzJmZDAyNi4uMWZhMTE0 YSAxM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