File tree 3 files changed +23
-3
lines changed 3 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -1024,7 +1024,18 @@ static struct platform_driver ci_hdrc_driver = {
1024
1024
},
1025
1025
};
1026
1026
1027
- module_platform_driver (ci_hdrc_driver );
1027
+ static int __init ci_hdrc_platform_register (void )
1028
+ {
1029
+ ci_hdrc_host_driver_init ();
1030
+ return platform_driver_register (& ci_hdrc_driver );
1031
+ }
1032
+ module_init (ci_hdrc_platform_register );
1033
+
1034
+ static void __exit ci_hdrc_platform_unregister (void )
1035
+ {
1036
+ platform_driver_unregister (& ci_hdrc_driver );
1037
+ }
1038
+ module_exit (ci_hdrc_platform_unregister );
1028
1039
1029
1040
MODULE_ALIAS ("platform:ci_hdrc" );
1030
1041
MODULE_LICENSE ("GPL v2" );
Original file line number Diff line number Diff line change @@ -249,9 +249,12 @@ int ci_hdrc_host_init(struct ci_hdrc *ci)
249
249
rdrv -> name = "host" ;
250
250
ci -> roles [CI_ROLE_HOST ] = rdrv ;
251
251
252
+ return 0 ;
253
+ }
254
+
255
+ void ci_hdrc_host_driver_init (void )
256
+ {
252
257
ehci_init_driver (& ci_ehci_hc_driver , & ehci_ci_overrides );
253
258
orig_bus_suspend = ci_ehci_hc_driver .bus_suspend ;
254
259
ci_ehci_hc_driver .bus_suspend = ci_ehci_bus_suspend ;
255
-
256
- return 0 ;
257
260
}
Original file line number Diff line number Diff line change 5
5
6
6
int ci_hdrc_host_init (struct ci_hdrc * ci );
7
7
void ci_hdrc_host_destroy (struct ci_hdrc * ci );
8
+ void ci_hdrc_host_driver_init (void );
8
9
9
10
#else
10
11
@@ -18,6 +19,11 @@ static inline void ci_hdrc_host_destroy(struct ci_hdrc *ci)
18
19
19
20
}
20
21
22
+ static void ci_hdrc_host_driver_init (void )
23
+ {
24
+
25
+ }
26
+
21
27
#endif
22
28
23
29
#endif /* __DRIVERS_USB_CHIPIDEA_HOST_H */
You can’t perform that action at this time.
0 commit comments