EINJ: Migrate to a platform driver
authorBen Cheatham <Benjamin.Cheatham@amd.com>
Mon, 11 Mar 2024 14:25:05 +0000 (09:25 -0500)
committerDan Williams <dan.j.williams@intel.com>
Wed, 13 Mar 2024 06:08:29 +0000 (23:08 -0700)
commit5621fafaac0031e8813be4873f8efa097591b026
treeb82865729934f30e7ae61b43ba0257ad7c9acf09
parentd206a76d7d2726f3b096037f2079ce0bd3ba329b
EINJ: Migrate to a platform driver

Change the EINJ module to install a platform device/driver on module
init and move the module init() and exit() functions to driver probe and
remove. This change allows the EINJ module to load regardless of whether
setting up EINJ succeeds, which allows dependent modules to still load
(i.e. the CXL core).

Since EINJ may no longer be initialized when the module loads, any
functions that are called from dependent/external modules should
safegaurd against the case EINJ didn't load.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Ben Cheatham <Benjamin.Cheatham@amd.com>
Link: https://lore.kernel.org/r/20240311142508.31717-2-Benjamin.Cheatham@amd.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/acpi/apei/einj.c