hwmon: (corsair-psu) Fix probe when built-in
authorArmin Wolf <W_Armin@gmx.de>
Thu, 7 Dec 2023 21:07:23 +0000 (22:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Jan 2024 10:51:42 +0000 (11:51 +0100)
commit3584858bfd34706b3dc60f2b83ef135ead1ffefa
treef86d6eefd56e0480c1fdb2a2cce895d3339cb14d
parent3f7109ec1fa540288f760d89d9baf2795bcb2614
hwmon: (corsair-psu) Fix probe when built-in

[ Upstream commit 307004e8b254ad28e150b63f299ab9caa4bc7c3e ]

It seems that when the driver is built-in, the HID bus is
initialized after the driver is loaded, which whould cause
module_hid_driver() to fail.
Fix this by registering the driver after the HID bus using
late_initcall() in accordance with other hwmon HID drivers.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20231207210723.222552-1-W_Armin@gmx.de
[groeck: Dropped "compile tested" comment; the patch has been tested
 but the tester did not provide a Tested-by: tag]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwmon/corsair-psu.c