Skip to content

Commit 45fd447

Browse files
jdelvareWolfram Sang
authored andcommitted
i2c: piix4: Fix port number check on release
The port number shift is still hard-coded to 1 while it now depends on the hardware. Thankfully 0 is always 0 no matter how you shift it, so this was a bug without consequences. Signed-off-by: Jean Delvare <[email protected]> Fixes: 0fe1619 ("i2c: piix4: Fix SMBus port selection for AMD Family 17h chips") Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 9c41e45 commit 45fd447

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/i2c/busses/i2c-piix4.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ static void piix4_adap_remove(struct i2c_adapter *adap)
983983

984984
if (adapdata->smba) {
985985
i2c_del_adapter(adap);
986-
if (adapdata->port == (0 << 1)) {
986+
if (adapdata->port == (0 << piix4_port_shift_sb800)) {
987987
release_region(adapdata->smba, SMBIOSIZE);
988988
if (adapdata->sb800_main)
989989
release_region(SB800_PIIX4_SMB_IDX, 2);

0 commit comments

Comments
 (0)