From patchwork Tue Jun 21 10:37:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12889007 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 57D56C433EF for ; Tue, 21 Jun 2022 10:39:07 +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:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=z9kdmOUsGqqNKbhjtU6wU657GX9eElYndRa4XRoFLm8=; b=pfH8vxMzArzIDV pxTy7GSkLiSwFzqeCfBzHbTnwWyImtAWzVHibgZL2d/p5slIF/3g5iNG21lliNK5GHx/3mZJRKuJP N+xLJ1Q4wDI5mGTo2d8QuhiOMvvti6dgaO8OMPBFoVz+STZ6dl3j+OdKqsllfvtuq8osSXXw1zM1H nK8F1R+C1L2CoNeB2zkuj4NBKDeKhazFCduZ+/Qua7LNFpFEaovazzU8g3yozLz34E72LtzmWqIHc oXr6UGfNMl2ILhc13Oo3nE1+APvvSEK7qhOOZ5We5xxSUGfwB4Jpa9GU66+d5jV/3eYup/+cVuCa3 c4H2QfQdms01x4sBrSvA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3bGm-004tIs-5X; Tue, 21 Jun 2022 10:38:04 +0000 Received: from mga02.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3bGj-004tGs-F4 for linux-arm-kernel@lists.infradead.org; Tue, 21 Jun 2022 10:38:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655807881; x=1687343881; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=fYz8uuFvylv6Ky43GZqcEtTMOEBoOJOUtkMSELIJ7lU=; b=ANb00EjzArxZszdCCrgDCBWEMQHMM5qH7E+AHKv2HNz6xlhuxbcyqqUz yd3RPBqf7yzRp1YTHG+36ZXpi5NSNULCltd/G874xXFa1kBrNWK3SxdRm YzfOPo0WNzMpK8U8sZR0UjzX19+fceHGeZYm3ATLTCh0lTWDz1arWuOvA c84wT1ge/WYVUcdMlaRJiklPZgJetomBQ1ybKtK7UOrqxhqZPLEIMalME 2AHXC8+alrf6sNX6wPseJJHr5BmvsaNkpmBLGu3/TsN16DTzYpBZjvA8q KnzppXGD6SirVRThXzq+6mELVV5K+ttyEm+MYYoFfX8fjzSoGcbbfTYOA w==; X-IronPort-AV: E=McAfee;i="6400,9594,10384"; a="268805812" X-IronPort-AV: E=Sophos;i="5.92,209,1650956400"; d="scan'208";a="268805812" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jun 2022 03:37:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,209,1650956400"; d="scan'208";a="689882530" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 21 Jun 2022 03:37:52 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 5743A13C; Tue, 21 Jun 2022 13:37:57 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Jonathan Cameron , Lars-Peter Clausen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Subject: [PATCH v2 1/1] iio: adc: mxs-lradc-adc: Get rid of OF specifics Date: Tue, 21 Jun 2022 13:37:54 +0300 Message-Id: <20220621103754.12771-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220621_033801_571341_CA5B7EC9 X-CRM114-Status: GOOD ( 16.62 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. 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 Tested-by: Fabio Estevam --- v2: added property.h (Fabio), added tag (Fabio) drivers/iio/adc/mxs-lradc-adc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/iio/adc/mxs-lradc-adc.c b/drivers/iio/adc/mxs-lradc-adc.c index bca79a93cbe4..02d2ffafe34d 100644 --- a/drivers/iio/adc/mxs-lradc-adc.c +++ b/drivers/iio/adc/mxs-lradc-adc.c @@ -17,8 +17,8 @@ #include #include #include -#include #include +#include #include #include @@ -692,7 +692,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 +721,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 +747,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;