diff options
author | Bruce Po <brucepo@google.com> | 2022-09-13 23:27:24 +0000 |
---|---|---|
committer | Bruce Po <brucepo@google.com> | 2022-09-13 23:27:24 +0000 |
commit | 827ddf40a63fa4ea0f7c997321a12a15fcf6f8f2 (patch) | |
tree | 870addfd4516238903ea348799724549e0dc34b7 | |
parent | 921e27a890fc1ce49f7e7132ea9be88ba56ff1b6 (diff) | |
download | aoc-android-gs-raviole-5.10-android13-qpr1-beta-3.tar.gz |
Fix USB failure due to aoc_platform_deviceandroid-t-qpr1-beta-3_r0.4android-t-qpr1-beta-3_r0.3android-13.0.0_r0.59android-13.0.0_r0.58android-13.0.0_r0.54android-13.0.0_r0.53android-13.0.0_r0.49android-13.0.0_r0.48main-16k-gs-raviole-5.10android-gs-raviole-5.10-android13-qpr1-beta-3android-gs-raviole-5.10-android13-qpr1android-gs-bluejay-5.10-android13-qpr1-beta-3android-gs-bluejay-5.10-android13-qpr1
aoc_service_read_timeout() and aoc_service_write_timeout() should get
the platform_device using aoc_service_dev.parent rather than the global
pointer aoc_platform_device.
This is more correct and avoids pointer corruption issue (still being
investigated).
BUG: 245657964
Signed-off-by: brucepo@google.com
Change-Id: I10031331db38aed60da503ecbdc95d89baf7fb88
-rw-r--r-- | aoc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1024,7 +1024,7 @@ ssize_t aoc_service_read_timeout(struct aoc_service_dev *dev, uint8_t *buffer, if (!aoc_platform_device) return -ENODEV; - prvdata = platform_get_drvdata(aoc_platform_device); + prvdata = dev_get_drvdata(dev->dev.parent); if (!prvdata) return -ENODEV; @@ -1185,7 +1185,7 @@ ssize_t aoc_service_write_timeout(struct aoc_service_dev *dev, const uint8_t *bu if (!aoc_platform_device) return -ENODEV; - prvdata = platform_get_drvdata(aoc_platform_device); + prvdata = dev_get_drvdata(dev->dev.parent); if (!prvdata) return -ENODEV; |