sollapse / opo_dwc3_otg

ACA charging + host mode hack for Oneplus One's DWC3 USB driver
26 stars 10 forks source link

error: 'struct dwc3_otg' has no member named 'non_standard_charger_work' #1

Open envake opened 1 year ago

envake commented 1 year ago

Hi. I got this old OPO lying around and need otg while charging. I tried to compile a fresh kernel with your modification but it fails with the following error. Any clue how to fix this? Thanks in advance!


/home/endeavouros/android/lineage/kernel/oppo/msm8974/drivers/usb/dwc3/dwc3_otg.c:213:18: warning: unused variable 'phy' [-Wunused-variable]
  struct usb_phy *phy = dotg->otg.phy;
                  ^
/home/endeavouros/android/lineage/kernel/oppo/msm8974/drivers/usb/dwc3/dwc3_otg.c: In function 'dwc3_otg_init':
/home/endeavouros/android/lineage/kernel/oppo/msm8974/drivers/usb/dwc3/dwc3_otg.c:1255:33: error: 'struct dwc3_otg' has no member named 'non_standard_charger_work'
   cancel_delayed_work_sync(&dotg->non_standard_charger_work);
                                 ^
make[4]: *** [/home/endeavouros/android/lineage/kernel/oppo/msm8974/scripts/Makefile.build:307: drivers/usb/dwc3/dwc3_otg.o] Error 1
make[3]: *** [/home/endeavouros/android/lineage/kernel/oppo/msm8974/scripts/Makefile.build:443: drivers/usb/dwc3] Error 2
make[3]: *** Waiting for unfinished jobs....```
sollapse commented 1 year ago

It's been so long since I've worked on this kernel so I would need to familiarize myself with the changes made in the codebase since then. However, the error is mentioning the reference to the member, non_standard_charger_work is not found in the dwc3_otg struct. I compiled this originally for the stock bacon kernel, or Franco's kernel at the time. You would need to review the header file for your current kernel where the struct is defined and compare the changes made from the original OPO stock kernel.

envake commented 1 year ago

Allright, thanks for your answer! I might try to figure out the changes.