From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 99565393DCF for ; Fri, 27 Feb 2026 13:57:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200633; cv=none; b=rKql/0vyUZEvhuL7k+vyP1lHSsSlXnmzBVVtAh4ixJMhFvINatIGxIU/LiFRcMPWa+y/xYmVjDJXe67VUSrDVkfeK+KGYwSiyHzhTIApq9UTmwtU4PyTdBrMSvjC3m59IOk1FVfPMNmGLQs31TIic8fx+SwPF70IwpdmijB7BYg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200633; c=relaxed/simple; bh=DemXEm0/7jPqDrRAPI2ny+O+6c7SOnzYnYssoNRbW6I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=M4VqhQ8En2QcO0/rMQknIAL/Y1SxCXk5iUmJ4HmjwyBiQ3mdhcpcMiIOugjlY37N4X8uND3FggBaZbflFiP14ldIXdOY5CBWmp346G+6h7/RhRtvc660REqWHzTS3tjjrybR8A5P7brOqkU6WFXWp3CEh/Ktmsq4i9yTChCIU0I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=mcUXSvYU; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="mcUXSvYU" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 67DF5C406A8; Fri, 27 Feb 2026 13:57:27 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 7A65D5FE74; Fri, 27 Feb 2026 13:57:11 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 754621036944D; Fri, 27 Feb 2026 14:56:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200628; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=09D8ciD6EX3li5458i+gRdBItReF2zPIbe1cyHSXFzo=; b=mcUXSvYUnjpneW3fWHyJbxchqrg2gTPck/1bjlu0JRihMGow1r6TpGfTHQpAq4CF33TQBd FZ1CItqOQ7t3fuk1XRJVEY0CfgxCoYmlKFs6ET8Rjfq6hN2S5vue7mFBdsuLyTMU2hylv5 Sw1LvbphCnr8LHEAE+8Hs/eU+pUUMVyHLyd39qAsXZxKJ2OOzw3RGk+J3ek7WGOWZ+2/QO yN4Q1wE762V8rD+C7OZjv9rQYWBV+0mwWo9BJ5IpGbYkOpGnQ8hL3y1IYs7aGQnkx1UIma JJqoMjGdrNOZLA0stFZugPLux6TPuOjsDBF8tpuf1Q7McRMH3hf/UfhM5fA3eQ== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 07/28] driver core: fw_devlink: Introduce fw_devlink_set_device() Date: Fri, 27 Feb 2026 14:54:04 +0100 Message-ID: <20260227135428.783983-8-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 Setting fwnode->dev is specific to fw_devlink. In order to avoid having a direct 'fwnode->dev = dev;' in several place in the kernel, introduce fw_devlink_set_device() helper to perform this operation. Signed-off-by: Herve Codina Reviewed-by: Andy Shevchenko Reviewed-by: Ulf Hansson --- include/linux/fwnode.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h index a921ca2fe940..a1345e274125 100644 --- a/include/linux/fwnode.h +++ b/include/linux/fwnode.h @@ -231,4 +231,10 @@ void fw_devlink_purge_absent_suppliers(struct fwnode_handle *fwnode); void fw_devlink_refresh_fwnode(struct fwnode_handle *fwnode); bool fw_devlink_is_strict(void); +static inline void fw_devlink_set_device(struct fwnode_handle *fwnode, + struct device *dev) +{ + fwnode->dev = dev; +} + #endif -- 2.53.0