Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5309016ioo; Wed, 1 Jun 2022 02:50:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWz2KAB5LUWfRVYGkIiZB3w7rBPTXT9vaFsWwxHLEtLpQ7eP0Qyg7zJQz4yxSrjbBLczBV X-Received: by 2002:a17:907:94c3:b0:6ff:8cd6:93d6 with SMTP id dn3-20020a17090794c300b006ff8cd693d6mr10769638ejc.118.1654077012955; Wed, 01 Jun 2022 02:50:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654077012; cv=none; d=google.com; s=arc-20160816; b=nJ9lyfAQe2LEuf7n4PJikztCcxJdbl9kLiIkET5HBd46CRuI6VzDheV/1VjUr3/zFY RL9ssxrpxinki1YoztLsfCMAU53y6I7j02IdM95pygvNJtM9N5T3DwwwuFSmoc3UO8wO hmUeLpJkpolX3P+DPE8y0zbqBhKklQmhMPv67MYi6wTXIIg7NPmY3tXQ0PL+QJCRt+B9 cofG7nF7XLM3ja2vWhyj5gz48XsTJbfqTxZ5cdItlc+4/6kGcPg6oROtyZkdXOyvdzWM szDoqvxVQXDEeko+PyCMnmAGbj8txUrrY80X+5pXS5TuV6PfHBbjmT8pV7Kdi2jL6h0v KOnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=jSPNXWkJaBjBk9cBtu1YXYTUUBpPl50yxj2eiwaVaLA=; b=izKKMVeDrZ+ZWLKBCMEQISzV1lsXLuO1/Apd9m+aXDpFuvDGQZq5EDHhHz5ahtg3Ds kp1irwR9i1BUdOQxF4EvPgQ4/iflJoGXHfo05xvja6NrBcjAn+4ccEVotNgnf0yn6tSK E5zlV0Va+k5yteFcnb8AYc+EkxrhdNr2dtq5EtmD/wStMMras4tsPznCUjBTc/k6ACri qNpU6PbybSvwogNLI1ElZdaiVQo7NAW+GJ8oc8lHr3CIY7fClt7M/khsSs8qSv13zwOc QbtfsgmfJ1Z06yyo56C9A5cwFBbsmPWGQdw7rzWrt4N4AtGOyLLp3TB+u/FzIda7vqoy rEdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jI7P05mz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e20-20020a170906505400b006feb7f82159si1219290ejk.107.2022.06.01.02.49.46; Wed, 01 Jun 2022 02:50:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jI7P05mz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239945AbiE3Rda (ORCPT + 99 others); Mon, 30 May 2022 13:33:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237590AbiE3Rd3 (ORCPT ); Mon, 30 May 2022 13:33:29 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E96C68FBF; Mon, 30 May 2022 10:33:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653932008; x=1685468008; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=vGd6TceShfTiRP/LCPoV/XqvXMkXKRaaG6E4ysLsdbU=; b=jI7P05mz7WkxbhyuMAwqdY+NA2jCumLWTtqjFewgHD/A/y6wvOILrE8p FJ5/4sjGG4p2n7jdLx1bbPpF115jGP4LG+9euoPJGEa42dUwEivWd7w/e vPnKyeCiN1rInfuro2brtKgyOtfcwqZeTq/c5qQOF6oLC/3Li4yFLrHao 1ET/SBi5M019EoxIeKSxQh9VE8jKxmxhC2jiPf7W4lR2bkLR4G4rp9HOg PuzynMxe0I3NK4Bq25s5RNAzyOYxNDbFhaXYS+5bjBUHWVvAQkYvvn7BE vhdMP66GZlxNh3cUtyv1J71IPPoLhbsvrTjJLfcho3yGxwePVZ6lVZ4IR g==; X-IronPort-AV: E=McAfee;i="6400,9594,10363"; a="274771055" X-IronPort-AV: E=Sophos;i="5.91,263,1647327600"; d="scan'208";a="274771055" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2022 10:33:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,263,1647327600"; d="scan'208";a="605280033" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga008.jf.intel.com with ESMTP; 30 May 2022 10:33:24 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 10438147; Mon, 30 May 2022 20:33:26 +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 v1 1/1] iio: adc: mxs-lradc-adc: Get rid of OF specifics Date: Mon, 30 May 2022 20:33:24 +0300 Message-Id: <20220530173324.921-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 --- 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; -- 2.35.1