Re: [PATCH v2 4.19.y-cip 01/22] device connection: Add fwnode member to struct device_connection

Pavel Machek


From: Heikki Krogerus <>

commit 09aa11cfda9d8186046bcd1adcd6498b688114f4 upstream.

This will prepare the device connection API for connections
described in firmware.
Ok, I made you do this. Sorry. I assumed it you'd just audit
initializers. I suggest to take this, anyway, but:

+++ b/drivers/extcon/extcon-axp288.c
@@ -446,6 +446,7 @@ static struct platform_driver axp288_extcon_driver = {

static struct device_connection axp288_extcon_role_sw_conn = {
+ .fwnode = NULL,
.endpoint[0] = "axp288_extcon",
.endpoint[1] = "intel_xhci_usb_sw-role-switch",
.id = "usb-role-switch",
This one is not neccessary as struct initializers are "filled" with 0s
when no other value is present.

diff --git a/drivers/platform/x86/intel_cht_int33fe.c b/drivers/platform/x86/intel_cht_int33fe.c
index f40b1c19..1fa77e4 100644
--- a/drivers/platform/x86/intel_cht_int33fe.c
+++ b/drivers/platform/x86/intel_cht_int33fe.c
@@ -175,15 +175,19 @@ static int cht_int33fe_probe(struct platform_device *pdev)
return -EPROBE_DEFER; /* Wait for i2c-adapter to load */

+ data->connections[0].fwnode = NULL;
And these should be already zero-initialized by

data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);

Anyway, extra initializations will not hurt.

Best regards,

(cesky, pictures)

Join to automatically receive all group messages.