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=-16.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_2 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 6F6B0C63777 for ; Mon, 30 Nov 2020 16:17:58 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 E0226206DF for ; Mon, 30 Nov 2020 16:17:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="i4zW6FiC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E0226206DF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=Huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=merlin.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=7ouXa7ncx0iY3qedA4+kYEGuxbH2zG0lXSJLfW2KY8w=; b=i4zW6FiCPmvZhRq3s4iZ5Xk1t P92GGDGZ3znhsazKhYIvKL4g2caRlCIg/CU67B1y/9JGwILaR2NKuEVzPr3oFZcI9+JvQx9Q4+vO3 sXJQ0hmxF9LSh46pjBkA9aNCfOCkY8NrHUQh/cf1fNmUcIpP8GjnW7P4/t4ydX6RjbyLRdmzBs2CJ KLs/IuXVsoJXRArie7i7kyCrNyspo8rKZtL6lA+zvm5tF1X6YHLk9YfnmTK5XoLa+KTniUHYYtT5g HdSvY2snEJ1vpJ56uhkGRHyWOf5DgZx7xhFAn4n32d9SklmkFP5qwDjcSs0OwtR5pdeo2Zc+IZpCP Yyw/Fgy1A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjlqw-0000ji-DO; Mon, 30 Nov 2020 16:16:38 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjlqt-0000j9-I7 for linux-arm-kernel@lists.infradead.org; Mon, 30 Nov 2020 16:16:36 +0000 Received: from fraeml703-chm.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Cl9Kc4bb5z67KjR; Tue, 1 Dec 2020 00:14:28 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by fraeml703-chm.china.huawei.com (10.206.15.52) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2106.2; Mon, 30 Nov 2020 17:16:21 +0100 Received: from localhost (10.47.30.241) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Mon, 30 Nov 2020 16:16:20 +0000 Date: Mon, 30 Nov 2020 16:16:00 +0000 From: Jonathan Cameron To: Bartosz Golaszewski Subject: Re: [PATH v3 3/3] iio: adc: xilinx: use more devres helpers and remove remove() Message-ID: <20201130161600.00000d66@Huawei.com> In-Reply-To: References: <20201130142759.28216-1-brgl@bgdev.pl> <20201130142759.28216-4-brgl@bgdev.pl> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; i686-w64-mingw32) MIME-Version: 1.0 X-Originating-IP: [10.47.30.241] X-ClientProxiedBy: lhreml715-chm.china.huawei.com (10.201.108.66) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201130_111635_716229_00D331D5 X-CRM114-Status: GOOD ( 18.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lars-Peter Clausen , linux-iio , Michal Simek , Linux Kernel Mailing List , Bartosz Golaszewski , Linux ARM , Peter Meerwald-Stadler , Jonathan Cameron Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 30 Nov 2020 15:30:22 +0100 Bartosz Golaszewski wrote: > On Mon, Nov 30, 2020 at 3:28 PM Bartosz Golaszewski wrote: > > > > From: Bartosz Golaszewski > > > > In order to simplify resource management and error paths in probe() and > > entirely drop the remove() callback - use devres helpers wherever > > possible. Define devm actions for cancelling the delayed work and > > disabling the clock. > > > > Signed-off-by: Bartosz Golaszewski > > --- > > [snip] > > > > > /* Set thresholds to min/max */ > > for (i = 0; i < 16; i++) { > > @@ -1334,59 +1353,23 @@ static int xadc_probe(struct platform_device *pdev) > > ret = xadc_write_adc_reg(xadc, XADC_REG_THRESHOLD(i), > > xadc->threshold[i]); > > if (ret) > > - goto err_free_irq; > > + return ret; > > } > > > > /* Go to non-buffered mode */ > > xadc_postdisable(indio_dev); > > > > - ret = iio_device_register(indio_dev); > > + ret = devm_iio_device_register(dev, indio_dev); > > if (ret) > > - goto err_free_irq; > > + return ret; > > > > platform_set_drvdata(pdev, indio_dev); > > > > Cr*p I was supposed to drop this line... > > Jonathan: can you drop it when applying? Sure. J > > Bartosz > > [snip] > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel