- superio_select(sioreg, NCT6775_LD_HWM);
- regval = superio_inb(sioreg, SIO_REG_ENABLE);
-
- /*
- * ASRock Z77 Pro4-M is known to not enable fan 3..5
- * if booted in UEFI Ultra-FastBoot mode.
- */
- if (!strcmp(board_vendor, "ASRock") &&
- !strcmp(board_name, "Z77 Pro4-M")) {
- if ((regval & 0xe0) != 0xe0) {
- pr_warn("Enabling Fans 3-5\n");
- regval |= 0xe0;
- superio_outb(sioreg, SIO_REG_ENABLE, regval);
+ if (board_name && board_vendor &&
+ !strcmp(board_vendor, "ASRock")) {
+ /*
+ * Auxiliary fan monitoring is not enabled on ASRock
+ * Z77 Pro4-M if booted in UEFI Ultra-FastBoot mode.
+ * Observed with BIOS version 2.00.
+ */
+ if (!strcmp(board_name, "Z77 Pro4-M")) {
+ if ((data->sio_reg_enable & 0xe0) != 0xe0) {
+ data->sio_reg_enable |= 0xe0;
+ superio_outb(sioreg, SIO_REG_ENABLE,
+ data->sio_reg_enable);
+ }