From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp2-g21.free.fr ([2a01:e0c:1:1599::11]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Ri7i7-0000qs-1I for barebox@lists.infradead.org; Tue, 03 Jan 2012 16:59:41 +0000 Received: from localhost.localdomain (unknown [82.240.38.71]) by smtp2-g21.free.fr (Postfix) with ESMTP id 3BD8E4B01ED for ; Tue, 3 Jan 2012 17:59:30 +0100 (CET) From: =?UTF-8?q?Eric=20B=C3=A9nard?= Date: Tue, 3 Jan 2012 17:59:26 +0100 Message-Id: <1325609969-21471-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 1/4] fsl_udc: update and fix To: barebox@lists.infradead.org LSB0aGlzIHBhdGNoIHN5bmMgZnNsX3VkYy5jIHdpdGggbGludXgncyBkcml2ZXIsCi0gYWRkIGEg cG9sbGVyIG9uIHVzYl9nYWRnZXRfcG9sbCB0byBnZXQgc2VyaWFsIGdhZGdldCB3b3JraW5nLAot IHJldHVybiAtRUlPIGluIHVzYl9nYWRnZXRfcG9sbCB3aGVuIHVkYyBpcyBzdG9wcGVkIChkbyBk ZXRlY3QKY2FibGUgZGlzb25uZWN0aW9uKQotIHRlc3RlZCBvbiBpLk1YMjUgJiBpLk1YMzUKClNp Z25lZC1vZmYtYnk6IEVyaWMgQsOpbmFyZCA8ZXJpY0BldWtyZWEuY29tPgotLS0KIGRyaXZlcnMv dXNiL2dhZGdldC9mc2xfdWRjLmMgfCAgIDQ1ICsrKysrKysrKysrKysrKysrKysrKysrKysrKysr KysrKy0tLS0tLS0tCiAxIGZpbGVzIGNoYW5nZWQsIDM2IGluc2VydGlvbnMoKyksIDkgZGV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