drm/i915/pmu: Stop setting event_init to NULL
authorLucas De Marchi <lucas.demarchi@intel.com>
Mon, 4 Nov 2024 21:35:10 +0000 (13:35 -0800)
committerLucas De Marchi <lucas.demarchi@intel.com>
Tue, 5 Nov 2024 19:24:33 +0000 (11:24 -0800)
commit9116b5760e615336b0c5060a85b25b2ec7d7c48b
tree547ffef8ddbc18154349b932353dcb084a535899
parentc62018a002dd5da0262e005a89fe691ca8d57cf6
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>
drivers/gpu/drm/i915/i915_pmu.c