Commit 9116b57
Lucas De Marchi
drm/i915/pmu: Stop setting event_init to NULL
Setting event_init to NULL is mostly done to detect when the driver is
partially working: i915 probed, but pmu is not registered. However,
checking for event_init is odd as it was supposed to always be set and
kernel/events/ would just crash if it found it set to NULL.
Since there's already a "closed" boolean, use that instead and extend
it's meaning to unregistered/unregistering.
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241104213512.2314930-3-lucas.demarchi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>1 parent c62018a commit 9116b57
1 file changed
Lines changed: 6 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | | - | |
| 305 | + | |
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
| 327 | + | |
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
| |||
1177 | 1177 | | |
1178 | 1178 | | |
1179 | 1179 | | |
1180 | | - | |
1181 | | - | |
1182 | 1180 | | |
1183 | 1181 | | |
1184 | 1182 | | |
| |||
1191 | 1189 | | |
1192 | 1190 | | |
1193 | 1191 | | |
1194 | | - | |
1195 | | - | |
1196 | 1192 | | |
1197 | 1193 | | |
1198 | 1194 | | |
| |||
1265 | 1261 | | |
1266 | 1262 | | |
1267 | 1263 | | |
1268 | | - | |
1269 | 1264 | | |
1270 | 1265 | | |
| 1266 | + | |
| 1267 | + | |
1271 | 1268 | | |
1272 | 1269 | | |
1273 | 1270 | | |
| |||
1316 | 1313 | | |
1317 | 1314 | | |
1318 | 1315 | | |
| 1316 | + | |
| 1317 | + | |
1319 | 1318 | | |
1320 | 1319 | | |
1321 | 1320 | | |
1322 | 1321 | | |
1323 | 1322 | | |
1324 | 1323 | | |
1325 | 1324 | | |
1326 | | - | |
1327 | 1325 | | |
1328 | 1326 | | |
1329 | 1327 | | |
| |||
1336 | 1334 | | |
1337 | 1335 | | |
1338 | 1336 | | |
1339 | | - | |
1340 | | - | |
1341 | | - | |
1342 | 1337 | | |
1343 | 1338 | | |
1344 | 1339 | | |
| |||
1352 | 1347 | | |
1353 | 1348 | | |
1354 | 1349 | | |
1355 | | - | |
1356 | 1350 | | |
1357 | 1351 | | |
1358 | 1352 | | |
| |||
0 commit comments