From patchwork Tue Jul 18 19:24:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 122207 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp1964916vqt; Tue, 18 Jul 2023 12:33:38 -0700 (PDT) X-Google-Smtp-Source: APBJJlFx+NYyReOvg0vzNMUAbpM3go3V/yUyC0LObBQJhEqc8M3BNbepvpRDup9XRZo7sBhJfMy5 X-Received: by 2002:a17:902:c405:b0:1b6:783d:9ba7 with SMTP id k5-20020a170902c40500b001b6783d9ba7mr19008830plk.27.1689708818316; Tue, 18 Jul 2023 12:33:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689708818; cv=none; d=google.com; s=arc-20160816; b=Q3t00/86XCO3Ihhibii896cFZ9Z4EFKODFoMWfNSUDVxj3IUiTQK4XwCeMrplwN66J nNc2Fn8psDo3KPf//WV1Di6eNtt4ckA/yOgeKgf0O7Ll5ggyTLt5nMtpDtc37jZaX6qs vmS9XJJoJCqxjtANHXVDe02qceC6p3va6MkL0wavr5vlIeRPPYIt5IRERGrP3Zn3ZQcW KZhYHxofGCNPQcv6Zhj8BiEQhJtqoeJCBV5It9GJCCvFNkjVZ1F/RJevE7j/BhggMyor MnMzSrZhMjGQ8H30sicD5e75Smb76PBVokGIfyvOU8LHvgA7nAPwZ3Z/NpTytpN/zUqX 2eLA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=aPCjjgna0nH74NVgoZ5Fpp2cqN8+5spHkZ3J1hnITPU=; fh=8SPOXdXcsbbrdLjCtKFrhdDDaSSTCLFzjvpt84tri9w=; b=xy57vxBu0J/rFaCYXyDFCXmebnufHlRtDP/ZxJCID301jQQ8g0aMHTme5mW/YwtGAX flujlnuRGNrYbiVsmHuI/CFPLif97Tzplx+VQZZiKCV9wO9rDUDJIYLVlsUEIv3mTzcV LD0/gafh7no64t5tJJNbnKoPuQ/0kSFW/9aWdhZ3gqUpqe6RAVKATIjx2FIFv4l8+1k8 6Srrm70oVUGNAAWO1obzeA+Q9gJTkV7lnGBCW0hzB700g5R7wePWIGIMK5BR7SoN1emj 8VkM9Sm2L1b71HjnMrDUPkGA6j4HAHEcX0OscaIf9KL4H6wXOMsmCjGWB857x+IpVTxl SiVw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z6-20020a170902d54600b001aaf1734d1dsi2006753plf.241.2023.07.18.12.33.23; Tue, 18 Jul 2023 12:33:38 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230302AbjGRTZd (ORCPT + 99 others); Tue, 18 Jul 2023 15:25:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229902AbjGRTZW (ORCPT ); Tue, 18 Jul 2023 15:25:22 -0400 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 199D81BDA; Tue, 18 Jul 2023 12:25:16 -0700 (PDT) X-IronPort-AV: E=Sophos;i="6.01,214,1684767600"; d="scan'208";a="173456562" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 19 Jul 2023 04:25:16 +0900 Received: from mulinux.home (unknown [10.226.93.62]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id C674C4067F07; Wed, 19 Jul 2023 04:25:13 +0900 (JST) From: Fabrizio Castro To: Mark Brown , Geert Uytterhoeven Cc: Fabrizio Castro , Andy Shevchenko , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Paterson , Biju Das , Lad Prabhakar , linux-renesas-soc@vger.kernel.org Subject: [PATCH v2 4/4] spi: rzv2m-csi: Make use of device_set_node Date: Tue, 18 Jul 2023 20:24:53 +0100 Message-Id: <20230718192453.543549-5-fabrizio.castro.jz@renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230718192453.543549-1-fabrizio.castro.jz@renesas.com> References: <20230718192453.543549-1-fabrizio.castro.jz@renesas.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771788113644837942 X-GMAIL-MSGID: 1771788113644837942 Use device_set_node instead of assigning controller->dev.of_node directly because it also sets the firmware node. Signed-off-by: Fabrizio Castro Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko --- v2: Edited the changelog and added include of property.h, according to the feedback received from Andy. drivers/spi/spi-rzv2m-csi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-rzv2m-csi.c b/drivers/spi/spi-rzv2m-csi.c index 62575a61608a..d098aefa370d 100644 --- a/drivers/spi/spi-rzv2m-csi.c +++ b/drivers/spi/spi-rzv2m-csi.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -589,12 +590,13 @@ static int rzv2m_csi_probe(struct platform_device *pdev) init_waitqueue_head(&csi->wait); controller->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST; - controller->dev.of_node = pdev->dev.of_node; controller->bits_per_word_mask = SPI_BPW_MASK(16) | SPI_BPW_MASK(8); controller->setup = rzv2m_csi_setup; controller->transfer_one = rzv2m_csi_transfer_one; controller->use_gpio_descriptors = true; + device_set_node(&controller->dev, dev_fwnode(dev)); + ret = devm_request_irq(dev, irq, rzv2m_csi_irq_handler, 0, dev_name(dev), csi); if (ret)