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.92.3 #3 (Red Hat Linux)) id 1jNttR-0005l8-9q for barebox@lists.infradead.org; Mon, 13 Apr 2020 07:52:43 +0000 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jNttP-0003WU-CB for barebox@lists.infradead.org; Mon, 13 Apr 2020 09:52:31 +0200 Received: from afa by dude.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1jNttO-0005FL-9y for barebox@lists.infradead.org; Mon, 13 Apr 2020 09:52:30 +0200 From: Ahmad Fatoum Date: Mon, 13 Apr 2020 09:51:56 +0200 Message-Id: <20200413075204.17544-14-a.fatoum@pengutronix.de> In-Reply-To: <20200413075204.17544-1-a.fatoum@pengutronix.de> References: <20200413075204.17544-1-a.fatoum@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 13/21] clk: at91: fix possible deadlock To: barebox@lists.infradead.org RnJvbTogQWxleGFuZHJlIEJlbGxvbmkgPGFsZXhhbmRyZS5iZWxsb25pQGJvb3RsaW4uY29tPgoK TG9ja2RlcCB3YXJucyBhYm91dCBhIHBvc3NpYmxlIGNpcmN1bGFyIGxvY2tpbmcgZGVwZW5kZW5j eSBiZWNhdXNlIHVzaW5nCnN5c2Nvbl9ub2RlX3RvX3JlZ21hcCgpIHdpbGwgbWFrZSB0aGUgY3Jl YXRlZCByZWdtYXAgZ2V0IGFuZCBlbmFibGUgdGhlCmZpcnN0IGNsb2NrIGl0IGNhbi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