Skip to content
/ linux Public

Commit 01fe5a2

Browse files
andy-shevSasha Levin
authored andcommitted
platform/chrome: cros_typec_switch: Don't touch struct fwnode_handle::dev
[ Upstream commit e1adf48 ] The 'dev' field in struct fwnode is special and related to device links, There no driver should use it for printing messages. Fix incorrect use of private field. Fixes: affc804 ("platform/chrome: cros_typec_switch: Add switch driver") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20260120131413.1697891-2-andriy.shevchenko@linux.intel.com Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 0347548 commit 01fe5a2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/platform/chrome/cros_typec_switch.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,20 +230,20 @@ static int cros_typec_register_switches(struct cros_typec_switch_data *sdata)
230230

231231
adev = to_acpi_device_node(fwnode);
232232
if (!adev) {
233-
dev_err(fwnode->dev, "Couldn't get ACPI device handle\n");
233+
dev_err(dev, "Couldn't get ACPI device handle for %pfwP\n", fwnode);
234234
ret = -ENODEV;
235235
goto err_switch;
236236
}
237237

238238
ret = acpi_evaluate_integer(adev->handle, "_ADR", NULL, &index);
239239
if (ACPI_FAILURE(ret)) {
240-
dev_err(fwnode->dev, "_ADR wasn't evaluated\n");
240+
dev_err(dev, "_ADR wasn't evaluated for %pfwP\n", fwnode);
241241
ret = -ENODATA;
242242
goto err_switch;
243243
}
244244

245245
if (index >= EC_USB_PD_MAX_PORTS) {
246-
dev_err(fwnode->dev, "Invalid port index number: %llu\n", index);
246+
dev_err(dev, "%pfwP: Invalid port index number: %llu\n", fwnode, index);
247247
ret = -EINVAL;
248248
goto err_switch;
249249
}

0 commit comments

Comments
 (0)