pmaports/device/testing/linux-asus-x00td/fix-macro-declare_usb_function.patch
iAboothahir 6127af7883
asus-x00td: new device (Asus Zenfone Max Pro M1) (MR 2973)
https://wiki.postmarketos.org/wiki/Asus_Zenfone_Max_Pro_M1_(asus-x00td)

Initially ported by Alice Koul.

iAboothahir: set CONFIG_DEVPTS_MULTIPLE_INSTANCES and remove empty deviceinfo_*

Signed-off-by: Alice Koul <alice-koul@protonmail.com>
Signed-off-by: iAboothahir <aboothahirpkd@gmail.com>

[ci:skip-build] Already built once fine on CI in MR
2022-03-03 15:37:02 +03:00

40 lines
946 B
Diff

--- a/drivers/usb/gadget/function/f_fs.c
+++ b/drivers/usb/gadget/function/f_fs.c
@@ -4295,7 +4295,7 @@
return data;
}
-DECLARE_USB_FUNCTION_INIT(ffs, ffs_alloc_inst, ffs_alloc);
+DECLARE_USB_FUNCTION(ffs, ffs_alloc_inst, ffs_alloc);
static int ffs_init(void)
{
@@ -4303,7 +4303,7 @@
if (IS_ERR_OR_NULL(ffs_ipc_log))
ffs_ipc_log = NULL;
- return 0;
+ usb_function_register(&ffsusb_func);
}
module_init(ffs_init);
@@ -4327,6 +4327,8 @@
ipc_log_context_destroy(ffs_ipc_log);
ffs_ipc_log = NULL;
}
+
+ usb_function_unregister(&ffsusb_func);
}
module_exit(ffs_exit);
--- a/drivers/usb/gadget/function/f_qc_rndis.c
+++ b/drivers/usb/gadget/function/f_qc_rndis.c
@@ -1528,7 +1528,7 @@
return rndis_ipa_params.skip_ep_cfg;
}
-DECLARE_USB_FUNCTION_INIT(rndis_bam, qcrndis_alloc_inst, qcrndis_alloc);
+DECLARE_USB_FUNCTION(rndis_bam, qcrndis_alloc_inst, qcrndis_alloc);
static int __init usb_qcrndis_init(void)
{