usb: provide usb reference to DisplayPort shutdown thread

Passes usb object reference to thread creation of
mDisplayPortShutdownHelper so that it can properly call DisplayPort
shutdown method instead of calling on NULL reference.

Test: manual test on device
Bug: 278395605
Change-Id: Ie4dabb5e3ae9065f57cc0fbf2593fbe399097472
This commit is contained in:
RD Babiera 2023-04-17 22:43:31 +00:00
parent 967e042adf
commit cc50d99508

View file

@ -1347,7 +1347,7 @@ void Usb::shutdownDisplayPortPoll() {
// Shutdown thread, make sure to rewrite hpd because file no longer exists.
write(mDisplayPortShutdown, &flag, sizeof(flag));
if (pthread_create(&mDisplayPortShutdownHelper, NULL, shutdownDisplayPortPollWork, NULL)) {
if (pthread_create(&mDisplayPortShutdownHelper, NULL, shutdownDisplayPortPollWork, this)) {
ALOGE("pthread creation failed %d", errno);
}
writeDisplayPortAttributeOverride("hpd", "0");