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 74DCC3F0763; Tue, 30 Jun 2026 10:29:25 +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=1782815366; cv=none; b=ST7PqTbhnixc3Qv7zKWeCU2PxbQ13TEbccd8SFq2M2aVxacvoUsTdKJbNbMrYOl7Z82/2c4BCTQj183RQwTJ3Dqlafx5WWd6D+QGnXds1PeDkibkA7zX9GElNriTBIAimQCrrePXMQM6SAnQIP3uIczCe965go/AbwkrYudOPtM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782815366; c=relaxed/simple; bh=uEzkDxg0X1+h/loF37XEZLw24ld5+gtm9HUTCwkd5No=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Km3XXYpE1tp7DDTPlL31B4+ZeRz1MG9UdJLiI54HjeenGVJBcGZgcqP/D3Qkuzq1h/UYL+Cz5g/h8TXpX6Xi9sDk+hYv5gBSH8Vx4k4dxQrsEHujqkRSWtPiHxKVPys5m9ev4dnnow+sU5EOb3DPqyjRRky6YrdrTGNAmyV7I4A= 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=FMAHhks+; 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="FMAHhks+" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 2085E1A0D52; Tue, 30 Jun 2026 10:29:24 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id DE0AE6025A; Tue, 30 Jun 2026 10:29:23 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 85012106F1D67; Tue, 30 Jun 2026 12:29:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1782815361; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=WQOdDq+bMcvgy5ZH9zZ1Hf2nk5o31pUAQw/Lzv3E+u8=; b=FMAHhks+21L+qp1dmkKI0sW2w5OPIIcb91AXUF3AwkDexhW04SVgjMLneIqHTiVOOkB5z0 D99tG5OvgXtU057xoKWyH1DiMA92gcoONrj1ggB0gi7awmVmCcpFA3SMHDE3dNQjYCgN+A nUu1uoI3NiyEzRBJ8EKzrR0nhzR0cDZZsPwHvEBYcDy9zSUC/pVwgi0Y0NzjrulGyFqBph u6C03pN2q2BnPXaZVDrfXn9RExU1xVimhcQG6rhnujIb5Msy+vNgkP1RRZFxLfF0NpdOrK NQCnNEB5wCtwXPADkR0SThJrr9tpXbNQQ2zmIiKQTlFafsxgT4IjR+IOIyBsxA== From: Herve Codina To: 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 , Ulf Hansson Subject: [PATCH v8 2/8] drivers: core: Use fw_devlink_set_device() Date: Tue, 30 Jun 2026 12:27:56 +0200 Message-ID: <20260630102804.413563-3-herve.codina@bootlin.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260630102804.413563-1-herve.codina@bootlin.com> References: <20260630102804.413563-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 The code set directly fwnode->dev field. Use the dedicated fw_devlink_set_device() helper to perform this operation. Signed-off-by: Herve Codina Reviewed-by: Andy Shevchenko Reviewed-by: Ulf Hansson --- drivers/base/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index 4d026682944f..c205125344cf 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -3750,7 +3750,7 @@ int device_add(struct device *dev) * device and the driver sync_state callback is called for this device. */ if (dev->fwnode && !dev->fwnode->dev) { - dev->fwnode->dev = dev; + fw_devlink_set_device(dev->fwnode, dev); fw_devlink_link_device(dev); } @@ -3925,7 +3925,7 @@ void device_del(struct device *dev) device_unlock(dev); if (dev->fwnode && dev->fwnode->dev == dev) - dev->fwnode->dev = NULL; + fw_devlink_set_device(dev->fwnode, NULL); /* Notify clients of device removal. This call must come * before dpm_sysfs_remove(). -- 2.54.0