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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id AF001C433EF for ; Fri, 3 Jun 2022 17:02:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc: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=58kJ3t2e9YEmvDah6Wym2Xy10R3sKHGk1bIhKAtDFtc=; b=iI2RH9Q9HvW8lF 5GM8+en1z2Sc8S9ng5YVMVmjItOnItU5VpqdtscKQ37g9NOgZoG3y75PTDXP7iIHS/KlRCt2aJUnc LuRMOZ5hjPQx9iQcaOLDDj7S4flzzZFnR+JgehhL1G0gMCKtbQ+xpxSocP7qKwU2QmFnQfjjqc0on qD34Dii+Xy99OOYyO9b5ukGdt0E0SpICyYzpiucfSc4EwpeGY0g8lsGmIOW3ieKvRuU4oOhlh7q4a UAYvIB4t2bmunUicOZErgeGvBX2GYeMRVEdgfAYj6uFhMbgQzvlSRn2wpsZZGRgY2EptPCaW+77Ke bGGLqcQy3kZZj44QBGwQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nxAfh-008Eub-DF; Fri, 03 Jun 2022 17:01:13 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nxAfc-008Etk-72 for linux-arm-kernel@lists.infradead.org; Fri, 03 Jun 2022 17:01:11 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8543661A3D; Fri, 3 Jun 2022 17:01:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A025C385A9; Fri, 3 Jun 2022 17:01:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654275666; bh=RSQ8NkpnOkmzm6/aUP8DpyGlnoqBYtHZOvzZFrlSehs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Pr7p+ki4uN5VzCRliCrBcm2J5wlHvJIcbX83rjlBZbFcnZRpQ0wn5aqLk2IVQ7XTr A4XFHNrZjvtcsIfyIjdKL4nEujpPosu9Ne8rsGecdfnm32FUyxwNkKcChqJP9MIUYQ uqMDUPyNyhBGxbmmxl8+R4OVohvaaEtImdZjmQ8ZU2c0ZRpZrNBa49jqR9824Lawsa 4pylqIseZNCNjoXSx+52+EoexjpnHn/xNNcGLZR0YpNC0AvthI0fq6ECD54b97iB5q LLmYlHsuzv02vt/H8hFrpoWDpwqbnsLo6j9GxJsV5E4NYHgEKSSrCqW79BtBZbZcRo cdm6s+8/BTleA== Date: Fri, 3 Jun 2022 18:10:06 +0100 From: Jonathan Cameron To: Andy Shevchenko Cc: linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Lars-Peter Clausen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Subject: Re: [PATCH v1 1/1] iio: adc: mxs-lradc-adc: Get rid of OF specifics Message-ID: <20220603181006.2c5cc6c4@jic23-huawei> In-Reply-To: <20220530173324.921-1-andriy.shevchenko@linux.intel.com> References: <20220530173324.921-1-andriy.shevchenko@linux.intel.com> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; 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-20220603_100108_389809_78317950 X-CRM114-Status: GOOD ( 19.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 May 2022 20:33:24 +0300 Andy Shevchenko wrote: > First of all, the additional conversion from vIRQ, and this is exactly > what is returned by platform_get_irq_byname(), to vIRQ is not needed. Confusing sentence form. Perhaps: First, the additional conversion from vIRQ (returned by platform_get_irq_byname()) to vIRQ is not needed. > Hence, drop no-op call to irq_of_parse_and_map(). > > Second, assign the firmware node instead of of_node. > > Signed-off-by: Andy Shevchenko Hi, Seems sensible to me, but I'd like a sanity check from someone more familiar with this driver. Thanks, Jonathan > --- > drivers/iio/adc/mxs-lradc-adc.c | 9 +++------ > 1 file changed, 3 insertions(+), 6 deletions(-) > > diff --git a/drivers/iio/adc/mxs-lradc-adc.c b/drivers/iio/adc/mxs-lradc-adc.c > index bca79a93cbe4..25292bb8a13f 100644 > --- a/drivers/iio/adc/mxs-lradc-adc.c > +++ b/drivers/iio/adc/mxs-lradc-adc.c > @@ -17,7 +17,6 @@ > #include > #include > #include > -#include > #include > #include > > @@ -692,7 +691,7 @@ static int mxs_lradc_adc_probe(struct platform_device *pdev) > struct mxs_lradc_adc *adc; > struct iio_dev *iio; > struct resource *iores; > - int ret, irq, virq, i, s, n; > + int ret, irq, i, s, n; > u64 scale_uv; > const char **irq_name; > > @@ -721,7 +720,7 @@ static int mxs_lradc_adc_probe(struct platform_device *pdev) > platform_set_drvdata(pdev, iio); > > iio->name = pdev->name; > - iio->dev.of_node = dev->parent->of_node; > + device_set_node(&iio->dev, dev_fwnode(dev->parent)); > iio->info = &mxs_lradc_adc_iio_info; > iio->modes = INDIO_DIRECT_MODE; > iio->masklength = LRADC_MAX_TOTAL_CHANS; > @@ -747,9 +746,7 @@ static int mxs_lradc_adc_probe(struct platform_device *pdev) > if (irq < 0) > return irq; > > - virq = irq_of_parse_and_map(dev->parent->of_node, irq); > - > - ret = devm_request_irq(dev, virq, mxs_lradc_adc_handle_irq, > + ret = devm_request_irq(dev, irq, mxs_lradc_adc_handle_irq, > 0, irq_name[i], iio); > if (ret) > return ret; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel