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 1RiSLD-0008VM-Lu for barebox@lists.infradead.org; Wed, 04 Jan 2012 15:01:25 +0000 Received: from localhost.localdomain (unknown [82.240.38.71]) by smtp2-g21.free.fr (Postfix) with ESMTP id 799E74B01AB for ; Wed, 4 Jan 2012 16:01:17 +0100 (CET) From: =?UTF-8?q?Eric=20B=C3=A9nard?= Date: Wed, 4 Jan 2012 16:01:16 +0100 Message-Id: <1325689276-12863-1-git-send-email-eric@eukrea.com> In-Reply-To: <20120104114533.GB1810@game.jcrosoft.org> References: <20120104114533.GB1810@game.jcrosoft.org> 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] loadb: only try to change the baudrate if the driver has this feature To: barebox@lists.infradead.org dGhpcyBhbGxvd3MgbG9hZGIgdG8gd29yayBvdmVyIHVzYnNlcmlhbCBnYWRnZXQKClNpZ25lZC1v ZmYtYnk6IEVyaWMgQsOpbmFyZCA8ZXJpY0BldWtyZWEuY29tPgotLS0KIGNvbW1hbmRzL2xvYWRi LmMgfCAgICA2ICsrKystLQogMSBmaWxlcyBjaGFuZ2VkLCA0IGluc2VydGlvbnMoKyksIDIgZGVs ZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvY29tbWFuZHMvbG9hZGIuYyBiL2NvbW1hbmRzL2xvYWRi LmMKaW5kZXggNDM5YTgzYS4uZDYwMzQwZSAxMDA2NDQKLS0tIGEvY29tbWFuZHMvbG9hZGIuYwor KysgYi9jb21tYW5kcy9sb2FkYi5jCkBAIC02OTAsMTIgKzY5MCwxMyBAQCBzdGF0aWMgaW50IGR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