From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD870C43381 for ; Sat, 16 Mar 2019 15:51:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AC92121903 for ; Sat, 16 Mar 2019 15:51:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="vAE0DXAc"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Rc86m/K9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AC92121903 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8JFQH3sN8XVxgd1GtxbgrIp2moeE75FT1a5UVma+UTc=; b=vAE0DXAc79ve47 rITXk1D3j9QjWuip83nqIX9ShI7vvVM5UpeBC5jGj7SN3hqbG/vnSddrZ1g7WVYx0V5gOX71yevIe xMXPFEfcY5cm/HH5knLq+Kpb/rsPlEpK4Ncj8T16cWt6Fat7Npc6+NKQUvEw5qZeLmScaYVFNSvGh drdFvxJjKWB2GDskvuQAcsYN+cmcF7Cul+gdgzX/g4gL720CfvjycbYwWAKfO4OcEj6dUECUxDpGK hF5cNrKBojZZv+KBFaad3hJMgPZJu8dE+1oKGOlvmEAwRkXmH/x1/dqW5selsBNJTGaDLVtdGfd6y 96Jc1M6xkcBLe16vUDaQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5Bb0-0007zS-Hc; Sat, 16 Mar 2019 15:51:38 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5Baw-0007z8-Ip for linux-arm-kernel@lists.infradead.org; Sat, 16 Mar 2019 15:51:35 +0000 Received: from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net [81.96.234.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2F6F6218E0; Sat, 16 Mar 2019 15:51:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552751494; bh=U/7GB3yO9nwOwezA2Ypi8xHH1JhtqFwT5fxZexfGrkE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Rc86m/K9ZH2df2aMzzt+dkgX7BDH9/ICZ0W8Sm5uwLoROfLBCTljqzeSU1yrVJIny kMTj7dOM3Wrt+Tzn6xky3iidCT04LVGSdKTvZeEiUMrjQ1/VrBahD5Y1OeU5Xg/96R eQ/2XAblBXvS/EA8gx255/IQHf2EhYkxkq92ISvA= Date: Sat, 16 Mar 2019 15:51:28 +0000 From: Jonathan Cameron To: Sven Van Asbroeck Subject: Re: [PATCH 3/3] iio: adc: xilinx: prevent touching unclocked h/w on remove Message-ID: <20190316155128.16ef1da1@archlinux> In-Reply-To: <20190310185826.25916-3-TheSven73@gmail.com> References: <20190310185826.25916-1-TheSven73@gmail.com> <20190310185826.25916-3-TheSven73@gmail.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190316_085134_640709_278A5F2F X-CRM114-Status: GOOD ( 15.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lars-Peter Clausen , linux-iio@vger.kernel.org, Michal Simek , linux-kernel@vger.kernel.org, Manish Narani , Peter Meerwald-Stadler , Hartmut Knaack , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, 10 Mar 2019 14:58:26 -0400 Sven Van Asbroeck wrote: > In remove, the clock is disabled before canceling the > delayed work. This means that the delayed work may be > touching unclocked hardware. > > Fix by disabling the clock after the delayed work is > fully canceled. This is consistent with the probe error > path order. > > Signed-off-by: Sven Van Asbroeck Applied to the fixes-togreg branch of iio.git. Thanks, Jonathan > --- > drivers/iio/adc/xilinx-xadc-core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c > index 15e1a103f37d..1ae86e7359f7 100644 > --- a/drivers/iio/adc/xilinx-xadc-core.c > +++ b/drivers/iio/adc/xilinx-xadc-core.c > @@ -1320,8 +1320,8 @@ static int xadc_remove(struct platform_device *pdev) > iio_triggered_buffer_cleanup(indio_dev); > } > free_irq(xadc->irq, indio_dev); > - clk_disable_unprepare(xadc->clk); > cancel_delayed_work_sync(&xadc->zynq_unmask_work); > + clk_disable_unprepare(xadc->clk); > kfree(xadc->data); > kfree(indio_dev->channels); > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel