From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (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 2DAFF469847; Wed, 9 Sep 2026 08:01:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788940909; cv=none; b=dYM164Bori+5PVuyWkXSB7rmCXX370aPwlk+Et6iJ075uI/rurvHmAbHL1cD3RtwJFcvk9534dBucG/q2SYiGmKRxa/aoGp9b7KOdrkzOEEtgT8CdLy4FYl6ex7yY1pRX66vgIQaxhRZmTcfvGFxNgZxHfOsfKwoeWrimXYttOo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788940909; c=relaxed/simple; bh=436BEBrvhYDKLZC0gPrxHFS5zcpKgaQ3L0yxxJjxcmI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=semTkIVNWfHW5D/N8tHkY2OczyuGYy+ClHhLiX/ezSB3qeobafdwlBhqPr3J9qojtFPCAu5V0PLrhqW05wQGaNaGz1lfq8JFMcyDrhWkEdlfOHgmPpXPz/U00/go+UVJTChEgPC2zfmw0SuNW1zmw702v3toAq+4qDWSpRXiUsc= 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=ir/hgAsf; arc=none smtp.client-ip=185.246.84.56 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="ir/hgAsf" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id C377E1A1A74; Wed, 9 Sep 2026 08:01:46 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 8BEEA60448; Wed, 9 Sep 2026 08:01:46 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id A9C1811C7AF5E; Wed, 9 Sep 2026 10:01:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1788940901; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=KQ3Gtk8g856i6Rmp0MlolORY4bAvnrQI8T3cMHPFI2I=; b=ir/hgAsfOto/1mgzWsgz5Eq7g/f934zjZ2cbV6qHaOL1DIC2H97q7PubGSzi88//a5+Shr xGjk9r8SSAgiL7FQM0tVkI/Z/rKCYbAcgCpFVqJuoIc/BlMwusTi4+3Ewdg//7MCHsD86x K21+h02b6syuXQ28KfgMRLlSeHzP7K+ZM6Pm5E6HRBkUN8EeP4jzchEulxmhg6ROf4FYQD Ep4+hbZPKEO2iFoRkdsSZopnjGytyrllOiyDYaOgSghKiaMiC3527f3rZRS2bBQ/YCAtkm nHlKEd7nLyBXoRrwQc8CK3ckCvTuRWT/uA47mhH+RDekNJvzK+lLgyZW93xR0w== From: Herve Codina To: Richard Cheng , Andrew Lunn , Rob Herring , Saravana Kannan , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Bartosz Golaszewski , Len Brown , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Dan Williams , Ira Weiny , Li Ming , Herve Codina , Lizhi Hou 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 v11 01/10] driver core: fw_devlink: Introduce fw_devlink_set_device() Date: Wed, 9 Sep 2026 10:01:00 +0200 Message-ID: <20260909080114.591938-2-herve.codina@bootlin.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260909080114.591938-1-herve.codina@bootlin.com> References: <20260909080114.591938-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-cxl@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 Reviewed-by: Richard Cheng --- 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 a9dcaf7e7076..3ce49575cf82 100644 --- a/include/linux/fwnode.h +++ b/include/linux/fwnode.h @@ -260,4 +260,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.55.0