Message ID | 20230715010407.1751715-11-fabrizio.castro.jz@renesas.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp2836522vqm; Fri, 14 Jul 2023 19:46:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlEaclLU95yuuE8GItR8M90+vmmNrTpk7j9IGSRpJ1pHOh7WCEjXw0xWhsmkdXxjur9fs5MF X-Received: by 2002:a05:6512:21a6:b0:4f9:5ca5:f1a6 with SMTP id c6-20020a05651221a600b004f95ca5f1a6mr4069157lft.17.1689389219248; Fri, 14 Jul 2023 19:46:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689389219; cv=none; d=google.com; s=arc-20160816; b=OrZr+32mXrXGM+ZLgV84T+RX+YFfc/3wovPtCWSWZOSguL5OOOruW6np42L9MXnT25 me/R4PjdX+qICLScpTMCU49wTOuzjsTY/HV8HF9XfJVtGOMBTf+b16j/HsvFaYtk8GMd 2ShZyLU9CmBAxEXSMom2p33Y1SZKkAu44DXkiHUOL2ASFh/9SdIz9pejaxz4Ea12WIk+ BaMt5589RDHspce00Z5zShgxAMRkXP0D6P8JYECm9ygStGp8jlKn5DHk7ZPPgrUnpm/v +7ClWoGIJUVETGXEQ4qRt65rFFyQVu88nPC7pY2/fAp0dApEcZ5jbMW7Yqir7Bq4FVZO JFtA== 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=Ygwk/hO2kVASU6NwotXf52E1DjnMEsnx4qkxFQb2zps=; fh=8SPOXdXcsbbrdLjCtKFrhdDDaSSTCLFzjvpt84tri9w=; b=p0w7qRGPGnGWPXwLE4IMjhi8aifxB22z7/GezKkkVCEH4yKFEjrZPJouJYCZzD3pUE vS26jVJwHDUSWtQYdzkZp/0Kg2EIqnCUf2dUpNamDPRTUozMb7jJyua0l+O6i8czTR3u puDILOVS8h1MbWLJ4FDTGNwvw5eF6ZAWzcF0lF9yd1eIpwspbWRqzKnEPWyeW5GLypni Dh4wXZfhSWnMqbyqChbLgnZb+nF/9IRmkT44XbZ3B6+9mwtfVBdxIcwCkA6yb51E4/ts wEFBh1WfGAXtTI6OvgUZN/MjHSkXGKkQLTELt72DBHQjEUQ8rFYtslHdAX5cYa8eseAH CdGA== 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 c20-20020aa7df14000000b0051e0f286ebasi9599198edy.491.2023.07.14.19.46.35; Fri, 14 Jul 2023 19:46:59 -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 S229506AbjGOBFu (ORCPT <rfc822;hadasmailinglist@gmail.com> + 99 others); Fri, 14 Jul 2023 21:05:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbjGOBFo (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 14 Jul 2023 21:05:44 -0400 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5335D3AA9; Fri, 14 Jul 2023 18:05:18 -0700 (PDT) X-IronPort-AV: E=Sophos;i="6.01,206,1684767600"; d="scan'208";a="172657895" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 15 Jul 2023 10:04:51 +0900 Received: from mulinux.home (unknown [10.226.92.194]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 4445740C4DAF; Sat, 15 Jul 2023 10:04:48 +0900 (JST) From: Fabrizio Castro <fabrizio.castro.jz@renesas.com> To: Mark Brown <broonie@kernel.org>, Geert Uytterhoeven <geert+renesas@glider.be> Cc: Fabrizio Castro <fabrizio.castro.jz@renesas.com>, Andy Shevchenko <andy.shevchenko@gmail.com>, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Paterson <Chris.Paterson2@renesas.com>, Biju Das <biju.das@bp.renesas.com>, Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>, linux-renesas-soc@vger.kernel.org Subject: [PATCH 10/10] spi: rzv2m-csi: Make use of device_set_node Date: Sat, 15 Jul 2023 02:04:07 +0100 Message-Id: <20230715010407.1751715-11-fabrizio.castro.jz@renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230715010407.1751715-1-fabrizio.castro.jz@renesas.com> References: <20230715010407.1751715-1-fabrizio.castro.jz@renesas.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771452989987139112 X-GMAIL-MSGID: 1771452989987139112 |
Series |
spi: rzv2m-csi: Code refactoring
|
|
Commit Message
Fabrizio Castro
July 15, 2023, 1:04 a.m. UTC
Use device_set_node instead of assigning controller->dev.of_node
directly.
Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
---
drivers/spi/spi-rzv2m-csi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On Sat, Jul 15, 2023 at 4:04 AM Fabrizio Castro <fabrizio.castro.jz@renesas.com> wrote: > > Use device_set_node instead of assigning controller->dev.of_node > directly. "...because it also sets the firmware node." You probably need to add property.h, if not added yet.
Hi Andy, > From: Andy Shevchenko <andy.shevchenko@gmail.com> > Subject: Re: [PATCH 10/10] spi: rzv2m-csi: Make use of device_set_node > > On Sat, Jul 15, 2023 at 4:04 AM Fabrizio Castro > <fabrizio.castro.jz@renesas.com> wrote: > > > > Use device_set_node instead of assigning controller->dev.of_node > > directly. > > "...because it also sets the firmware node." > > You probably need to add property.h, if not added yet. You are right, I'll send a v2 for this. I'll also add the related Suggested-by and Reviewed-by tags in v2. Cheers, Fab > > -- > With Best Regards, > Andy Shevchenko
diff --git a/drivers/spi/spi-rzv2m-csi.c b/drivers/spi/spi-rzv2m-csi.c index 1874ca1c2747..ad7ca514eb09 100644 --- a/drivers/spi/spi-rzv2m-csi.c +++ b/drivers/spi/spi-rzv2m-csi.c @@ -575,12 +575,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)