From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1boRxL-0001RM-79 for barebox@lists.infradead.org; Mon, 26 Sep 2016 09:12:12 +0000 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Mon, 26 Sep 2016 11:11:37 +0200 Message-Id: <20160926091137.24719-2-u.kleine-koenig@pengutronix.de> In-Reply-To: <20160926091137.24719-1-u.kleine-koenig@pengutronix.de> References: <20160926091137.24719-1-u.kleine-koenig@pengutronix.de> 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" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 2/2] firmware: altera-serial: simplify handling of optional gpio To: barebox@lists.infradead.org U2lnbmVkLW9mZi1ieTogVXdlIEtsZWluZS1Lw7ZuaWcgPHUua2xlaW5lLWtvZW5pZ0BwZW5ndXRy b25peC5kZT4KLS0tCiBkcml2ZXJzL2Zpcm13YXJlL2FsdGVyYV9zZXJpYWwuYyB8IDEyICsrKysr LS0tLS0tLQogMSBmaWxlIGNoYW5nZWQsIDUgaW5zZXJ0aW9ucygrKSwgNyBkZWxldGlvbnMoLSkK CmRpZmYgLS1naXQgYS9kcml2ZXJzL2Zpcm13YXJlL2FsdGVyYV9zZXJpYWwuYyBiL2RyaXZlcnMv ZmlybXdhcmUvYWx0ZXJhX3NlcmlhbC5jCmluZGV4IDU0ODZkOWVjNjNlOS4uZGRlZTk5MWVkMDcz IDEwMDY0NAotLS0gYS9kcml2ZXJzL2Zpcm13YXJlL2FsdGVyYV9zZXJpYWwuYworKysgYi9kcml2 ZXJzL2Zpcm13YXJlL2FsdGVyYV9zZXJpYWwuYwpAQCAtMjIxLDE1ICs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