提交 45fd4470 编写于 作者: J Jean Delvare 提交者: Wolfram Sang

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: NJean Delvare <jdelvare@suse.de>
Fixes: 0fe16195 ("i2c: piix4: Fix SMBus port selection for AMD Family 17h chips")
Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
上级 9c41e452
......@@ -983,7 +983,7 @@ static void piix4_adap_remove(struct i2c_adapter *adap)
if (adapdata->smba) {
i2c_del_adapter(adap);
if (adapdata->port == (0 << 1)) {
if (adapdata->port == (0 << piix4_port_shift_sb800)) {
release_region(adapdata->smba, SMBIOSIZE);
if (adapdata->sb800_main)
release_region(SB800_PIIX4_SMB_IDX, 2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册