From patchwork Wed Dec 22 15:57:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12691782 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1816CC43217 for ; Wed, 22 Dec 2021 15:57:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241565AbhLVP5h (ORCPT ); Wed, 22 Dec 2021 10:57:37 -0500 Received: from mga18.intel.com ([134.134.136.126]:50990 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343765AbhLVP5g (ORCPT ); Wed, 22 Dec 2021 10:57:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1640188655; x=1671724655; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=cH+SPBYsfFuuHbv9XNShzanFxeXA/W1PKBHvRD1wzMs=; b=KdhtgZKh1i0GJ2x0JZtom70seKxhK3Jy5q4Nx86Y2r12HKCiQlvnLUfH xEmtqskHMqtHttz82GFZxUDrwwsVujsoYz8nqmqLHd9HpS9Q770e+PUZ1 qPfz2IVl1YcsUnrpDkCugZjEUopmSnnEA7Hq2DZN2mtvQWJY2zP+9R/cO w0kXT9awdKE3w0tMjLEryJQ7PYYtPHWQ1jQW5RYsLywLxAu2wa+8YhaUN HidvHkvGDYPzIyEWUevPlXTT1eqvEZvmdsynFRL6kTerHlPTvT7MLVu5P jDD0qu8fpsc2SIshMGHWuUT5ZFvWSWOc4cwy/lpRphEhVKFNwWcxXOWlf Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10206"; a="227495764" X-IronPort-AV: E=Sophos;i="5.88,226,1635231600"; d="scan'208";a="227495764" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2021 07:57:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,226,1635231600"; d="scan'208";a="570608655" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga008.fm.intel.com with ESMTP; 22 Dec 2021 07:57:32 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 0AA33FE; Wed, 22 Dec 2021 17:57:40 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , Mark Brown , Serge Semin , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Serge Semin , Daniel Mack , Haojian Zhuang , Robert Jarzmik Subject: [PATCH v2 1/3] spi: dln2: Propagate firmware node Date: Wed, 22 Dec 2021 17:57:37 +0200 Message-Id: <20211222155739.7699-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Propagate firmware node by using a specific API call, i.e. device_set_node(). Signed-off-by: Andy Shevchenko --- v2: included property.h to avoid compilation error (Mark) drivers/spi/spi-dln2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-dln2.c b/drivers/spi/spi-dln2.c index 3ff63ab82f4f..0a1fb2bc9e54 100644 --- a/drivers/spi/spi-dln2.c +++ b/drivers/spi/spi-dln2.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -688,6 +689,8 @@ static int dln2_spi_probe(struct platform_device *pdev) if (!master) return -ENOMEM; + device_set_node(&master->dev, dev_fwnode(dev)); + platform_set_drvdata(pdev, master); dln2 = spi_master_get_devdata(master); @@ -699,7 +702,6 @@ static int dln2_spi_probe(struct platform_device *pdev) } dln2->master = master; - dln2->master->dev.of_node = dev->of_node; dln2->pdev = pdev; dln2->port = pdata->port; /* cs/mode can never be 0xff, so the first transfer will set them */