Skip to contentSkip to conversation

usb: typec: tipd: fix use of device-specific init function

PATCH In review Javier Carrasco 3 participants 4 messages Jan 4, 2024 – Jan 5, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: typec: tipd: fix use of device-specific init function

The current implementation supports device-pecific callbacks for the init function with a function pointer. The patch that introduced this feature did not update one call to the tps25750 init function to turn it into a call with the new pointer in the resume function.

Fixes d49f90822015 ("usb: typec: tipd: add init and reset functions to tipd_data")
---
 drivers/usb/typec/tipd/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/tipd/core.c +1 -1
index a956eb976906..8a7cdfee27a1 100644
@@ -1495,7 +1495,7 @@ static int __maybe_unused tps6598x_resume(struct device *dev)
 		return ret;
 
 	if (ret == TPS_MODE_PTCH) {
-		ret = tps25750_init(tps);
+		ret = tps->data->init(tps);
 		if (ret)
 			return ret;
 	}

---
base-commit: e7d3b9f28654dbfce7e09f8028210489adaf6a33
change-id: 20240104-dev_spec_init-4df8711295cd

Best regards,

Signature · 1 line
Javier Carrasco <[email protected]>
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Javier Carrasco

The current implementation supports device-pecific callbacks for the init function with a function pointer. The patch that introduced this feature did not update one call to the tps25750 init function to turn it into a call with the new pointer in the resume function.

Fixes d49f90822015 ("usb: typec: tipd: add init and reset functions to tipd_data")

This was suggested by Roger, no?

Quoted 9 lines
---
 drivers/usb/typec/tipd/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/tipd/core.c +0 -0
index a956eb976906..8a7cdfee27a1 100644

drivers/usb/typec/tipd/core.c static int __maybe_unused tps6598x_resume(struct device *dev) · line 1501

Quoted 8 lines
drivers/usb/typec/tipd/core.c +1 -1
@@ -1495,7 +1495,7 @@ static int __maybe_unused tps6598x_resume(struct device *dev)
 		return ret;
 
 	if (ret == TPS_MODE_PTCH) {
-		ret = tps25750_init(tps);
+		ret = tps->data->init(tps);
 		if (ret)
 			return ret;
 	}

thans,

Signature · 1 line
heikki
#2 lore raw
Quoted 11 lines · Heikki Krogerus
Quoted 7 lines · Javier Carrasco

The current implementation supports device-pecific callbacks for the init function with a function pointer. The patch that introduced this feature did not update one call to the tps25750 init function to turn it into a call with the new pointer in the resume function.

Fixes d49f90822015 ("usb: typec: tipd: add init and reset functions to tipd_data")

This was suggested by Roger, no?

Yes, it was. Thanks for the reminder.

Could the following trailer be added before applying?

Otherwise I will resend the patch with that addition.

Quoted 22 lines
Quoted 9 lines
---
 drivers/usb/typec/tipd/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/tipd/core.c +0 -0
index a956eb976906..8a7cdfee27a1 100644

drivers/usb/typec/tipd/core.c static int __maybe_unused tps6598x_resume(struct device *dev) · line 1501

Quoted 8 lines
drivers/usb/typec/tipd/core.c +1 -1
@@ -1495,7 +1495,7 @@ static int __maybe_unused tps6598x_resume(struct device *dev)
 		return ret;
 
 	if (ret == TPS_MODE_PTCH) {
-		ret = tps25750_init(tps);
+		ret = tps->data->init(tps);
 		if (ret)
 			return ret;
 	}

thans,

#3 lore raw
Quoted 10 lines · Javier Carrasco
Quoted 9 lines · Heikki Krogerus
Quoted 7 lines · Javier Carrasco

The current implementation supports device-pecific callbacks for the init function with a function pointer. The patch that introduced this feature did not update one call to the tps25750 init function to turn it into a call with the new pointer in the resume function.

Fixes d49f90822015 ("usb: typec: tipd: add init and reset functions to tipd_data")
Quoted 8 lines
Quoted 2 lines

This was suggested by Roger, no?

Yes, it was. Thanks for the reminder.

Could the following trailer be added before applying?

The tools automatically just added that now, thanks.

greg k-h