File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -81,10 +81,11 @@ static int __maybe_unused catpt_resume(struct device *dev)
81
81
if (ret )
82
82
return ret ;
83
83
84
- if (!module_is_live (dev -> driver -> owner )) {
84
+ if (!try_module_get (dev -> driver -> owner )) {
85
85
dev_info (dev , "module unloading, skipping fw boot\n" );
86
86
return 0 ;
87
87
}
88
+ module_put (dev -> driver -> owner );
88
89
89
90
ret = catpt_boot_firmware (cdev , true);
90
91
if (ret ) {
@@ -107,10 +108,12 @@ static int __maybe_unused catpt_resume(struct device *dev)
107
108
108
109
static int __maybe_unused catpt_runtime_suspend (struct device * dev )
109
110
{
110
- if (!module_is_live (dev -> driver -> owner )) {
111
+ if (!try_module_get (dev -> driver -> owner )) {
111
112
dev_info (dev , "module unloading, skipping suspend\n" );
112
113
return 0 ;
113
114
}
115
+ module_put (dev -> driver -> owner );
116
+
114
117
return catpt_suspend (dev );
115
118
}
116
119
You can’t perform that action at this time.
0 commit comments