diff options
author | 2023-12-08 11:46:41 -0800 | |
---|---|---|
committer | 2023-12-08 11:46:41 -0800 | |
commit | 0dfe14fca933dc729fd7671c7b8fa616d74856b7 (patch) | |
tree | 4a7d53402d74997a93c139ef095ee75022f6d9a3 /drivers/hwmon/corsair-psu.c | |
parent | Merge tag 'pwm/for-6.7-rc5-fixes' of https://git.pengutronix.de/git/ukl/linux (diff) | |
parent | hwmon: (corsair-psu) Fix probe when built-in (diff) | |
download | linux-0dfe14fca933dc729fd7671c7b8fa616d74856b7.tar.gz linux-0dfe14fca933dc729fd7671c7b8fa616d74856b7.tar.bz2 linux-0dfe14fca933dc729fd7671c7b8fa616d74856b7.zip |
Merge tag 'hwmon-for-v6.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon fixes from Guenter Roeck:
- acpi_power_meter: Fix 4.29 MW output seen if acpi reports bad data
- corsair-psu: Fix ability to probe if the driver is built into the kernel
- ltc2991: Fix spelling mistake "contiuous" -> "continuous"
- max31827: Add missing regulator header file include
- nzxt-kraken2: Fix error handling path in probe function
* tag 'hwmon-for-v6.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: (corsair-psu) Fix probe when built-in
hwmon: (nzxt-kraken2) Fix error handling path in kraken2_probe()
hwmon: (acpi_power_meter) Fix 4.29 MW bug
hwmon: max31827: include regulator header
hwmon: ltc2991: Fix spelling mistake "contiuous" -> "continuous"
Diffstat (limited to 'drivers/hwmon/corsair-psu.c')
-rw-r--r-- | drivers/hwmon/corsair-psu.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/hwmon/corsair-psu.c b/drivers/hwmon/corsair-psu.c index 904890598c11..2c7c92272fe3 100644 --- a/drivers/hwmon/corsair-psu.c +++ b/drivers/hwmon/corsair-psu.c @@ -899,7 +899,23 @@ static struct hid_driver corsairpsu_driver = { .reset_resume = corsairpsu_resume, #endif }; -module_hid_driver(corsairpsu_driver); + +static int __init corsair_init(void) +{ + return hid_register_driver(&corsairpsu_driver); +} + +static void __exit corsair_exit(void) +{ + hid_unregister_driver(&corsairpsu_driver); +} + +/* + * With module_init() the driver would load before the HID bus when + * built-in, so use late_initcall() instead. + */ +late_initcall(corsair_init); +module_exit(corsair_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Wilken Gottwalt <wilken.gottwalt@posteo.net>"); |