--- zzzz-none-000/linux-5.4.213/drivers/mfd/qcom-spmi-pmic.c 2022-09-15 10:04:56.000000000 +0000 +++ alder-5690pro-762/linux-5.4.213/drivers/mfd/qcom-spmi-pmic.c 2024-08-14 09:02:07.000000000 +0000 @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2014, The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -133,14 +134,28 @@ MODULE_DEVICE_TABLE(of, pmic_spmi_id_table); +static void pmic_spmi_remove(struct spmi_device *sdev) {} + static struct spmi_driver pmic_spmi_driver = { .probe = pmic_spmi_probe, + .remove = pmic_spmi_remove, .driver = { .name = "pmic-spmi", .of_match_table = pmic_spmi_id_table, }, }; -module_spmi_driver(pmic_spmi_driver); + +static int __init pmic_spmi_driver_init(void) +{ + return spmi_driver_register(&pmic_spmi_driver); +} +arch_initcall(pmic_spmi_driver_init); + +static void __exit pmic_spmi_driver_exit(void) +{ + spmi_driver_unregister(&pmic_spmi_driver); +} +module_exit(pmic_spmi_driver_exit); MODULE_DESCRIPTION("Qualcomm SPMI PMIC driver"); MODULE_ALIAS("spmi:spmi-pmic");