From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 5FA75425CC1 for ; Mon, 11 May 2026 16:00:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778515205; cv=none; b=jCpKONM6oCHxW93zswas5ugF9sURbpNrwsThyNj+3XTjMwDSYFPzaMSfMj8iuB3jB45m5mF+JAfvwjLQWZfpKMToMuYvaQrXTK/DaqaLVXFcCKGKiBL/Y4YEzbYxvsAuswKJcu5Z9/fRMVsA48BFCrHnixdEf3szCV/mFlc9v28= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778515205; c=relaxed/simple; bh=/XvRviTCSin2LUKs7yMbKa4zISIWmVGD9lbA+HJpyZM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kPKaxdsOsKeiM6glmNnZ+lXAiSrR45UOppfz8mTt2/XjeiyokOp6h9YM8PiEVD7kiP0kdoHEvKFzuWaAGijny/35UaqdtDWdN98OfKkBoejUEkZq03TUH4Hx8C9kkx+AsrJZKQzpWVEyypJU0s52Yv7KMeAbrmxYzhfENe3q+Jw= 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=NJhItOyl; arc=none smtp.client-ip=185.246.85.4 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="NJhItOyl" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 15CE24E42BF3; Mon, 11 May 2026 16:00:03 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id CF1E260646; Mon, 11 May 2026 16:00:02 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 0BC3411AF9E9C; Mon, 11 May 2026 17:59:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1778515198; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=eLso7qwKwUfCrw/iPEq5uoZWKKfHhCJUIGRDgunoGhI=; b=NJhItOylrAiwDkCzbHOBzVRzh3USUjbhaP0ErMZje3yNJKKe0sOtMd+M0qFpIPrqoxNQK3 oMbSPSJgEsqCGf7RA6qn6e4yR2fasJxS+xLqYUZH5RG2T1T3iYqnWnQ0k2r1Ksu1KtIhLb ML7H5nViITBQ/DKItODI/B7Yn/o0Mt7eEtmYXHQ6+KXkpuRA49tg1FJIW85OYqOu+YieWa yqqTXjCPiW/zgDGPWo2YHJAvsNmWltB/Nefokjo1izepLlPpPNzyAlIQI9IJ8HdOEc5g7J +oS+dp9j3z2gJrUj+Y3c/YCHFX6+FI/rgisaU0rR7DaQDvwrDCvD55s80TcexQ== From: Herve Codina To: Andrew Lunn , Rob Herring , Saravana Kannan , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , 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 v7 2/8] drivers: core: Use fw_devlink_set_device() Date: Mon, 11 May 2026 17:59:22 +0200 Message-ID: <20260511155930.34604-3-herve.codina@bootlin.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260511155930.34604-1-herve.codina@bootlin.com> References: <20260511155930.34604-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: driver-core@lists.linux.dev 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 bd2ddf2aab50..5c9a34aaefe1 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -3684,7 +3684,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); } @@ -3859,7 +3859,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