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 3448438B142; Wed, 8 Jul 2026 10:04:31 +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=1783505073; cv=none; b=mi5fZ84qX2OhY9PeW1oRJvTIDKkKmQKgBRdO+ai+//bFqGQZnxty3WrpKNXE337o2LyGBkltoZHkhAq5hX7eDuUjgu5ZxedwOYG+Wz2gKdQqn/kIA/pDrH4naB/nfSmuBXmpJwYIZpTQc0gI6JGSuvVhJ69+Qr7NoGYrxtPp1xg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783505073; c=relaxed/simple; bh=Dr7yY5XLV8e/9e5N9FOL+bV4EWOSxszyyOnFOIzQXrs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ol6qbfU3N4EY9MwhkVtxj+y3kTx9aQmKXPSWjXbpZx6CCPgKyzCl4G89LcDXmnnECj2YMxkLW9ljB+TngpFy0i7SDv9CRwFOaIRY1EzZiygM+sJpyxfOtJb0XtKmrZXDM9M2pQK5ABDlT4VrtT46phHLxN9nFMLByOdGj4kSv0Q= 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=MESKkIMf; 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="MESKkIMf" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 94BFEC8F448; Wed, 8 Jul 2026 10:04:43 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id A8B7860337; Wed, 8 Jul 2026 10:04:29 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id D911511BC33D6; Wed, 8 Jul 2026 12:04:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1783505067; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=N5mQBROnrDBEAwginXZzryOTa1g0CZWIynlCLymzLoo=; b=MESKkIMf7M9PljdQihORQF2hfIL8Vpu6e/+i3mujJWBQrGBD+U3R6lG0xoUc0S5JTeaTfy Y+XPW7+0QuF5cWNdb3Vm12uzY4wCaheRs2gDcrX9VlFC2zby0Zgzf5i7MLoH2THSx50Xbg t88Rl4892Cdkt7FPFM3viEGz/Jwe2grrf7QX7pRq7CufXZzdIzY13hdpZVRO/VvJWr2eSQ VBuVr8VRM0SjzF1iwPL1KANlQqwGJCBGi8k8m6Ug6o5k8GReX4riK6EGjsseoxpdI5yvcw T6R+utUAoYSBWQz7wVeFuusd8UrKymfWQ/ARJryDKXfa0WVYyEJFsZzUN1e8ww== From: Herve Codina To: Richard Cheng , Andrew Lunn , Rob Herring , Saravana Kannan , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Bjorn Helgaas , David Rhodes , Richard Fitzgerald , Charles Keepax , Linus Walleij , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Dan Williams , Ira Weiny , Li Ming , Lizhi Hou , Herve Codina Cc: driver-core@lists.linux.dev, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Daniel Machon , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni , stable@vger.kernel.org, Ulf Hansson Subject: [PATCH v9 1/9] driver core: fw_devlink: Introduce fw_devlink_set_device() Date: Wed, 8 Jul 2026 12:02:51 +0200 Message-ID: <20260708100302.517792-2-herve.codina@bootlin.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260708100302.517792-1-herve.codina@bootlin.com> References: <20260708100302.517792-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org 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. Having this helper allows to hide the fwnode devlink related stuff behind the helper. Cc: stable@vger.kernel.org Signed-off-by: Herve Codina Reviewed-by: Andy Shevchenko Reviewed-by: Ulf Hansson Reviewed-by: Charles Keepax --- Cc stable because used by other patches with Fixes + Cc stable --- include/linux/fwnode.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h index 4e86e6990d28..31538f54b1ca 100644 --- a/include/linux/fwnode.h +++ b/include/linux/fwnode.h @@ -256,4 +256,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.54.0