Skip to content

Commit 10b29dd

Browse files
committed
platform/x86: thinkpad_acpi: Don't use test_bit on an integer
test_bit can only be used on longs not on ints, fix this. Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 6229ce9 commit 10b29dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/platform/x86/thinkpad_acpi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10399,7 +10399,7 @@ static int tpacpi_dytc_profile_init(struct ibm_init_struct *iibm)
1039910399
if (err)
1040010400
return err;
1040110401

10402-
if (test_bit(DYTC_FC_MMC, (void *)&output)) { /* MMC MODE */
10402+
if (output & BIT(DYTC_FC_MMC)) { /* MMC MODE */
1040310403
dytc_profile_available = DYTC_FUNCMODE_MMC;
1040410404

1040510405
/*
@@ -10412,7 +10412,7 @@ static int tpacpi_dytc_profile_init(struct ibm_init_struct *iibm)
1041210412
if (!err && ((output & DYTC_ERR_MASK) == DYTC_ERR_SUCCESS))
1041310413
dytc_mmc_get_available = true;
1041410414
}
10415-
} else if (test_bit(DYTC_FC_PSC, (void *)&output)) { /*PSC MODE */
10415+
} else if (output & BIT(DYTC_FC_PSC)) { /* PSC MODE */
1041610416
dytc_profile_available = DYTC_FUNCMODE_PSC;
1041710417
} else {
1041810418
dbg_printk(TPACPI_DBG_INIT, "No DYTC support available\n");

0 commit comments

Comments
 (0)