From: Jean Delvare <jdelvare@suse.de>
To: Linux I2C <linux-i2c@vger.kernel.org>
Cc: Guenter Roeck <linux@roeck-us.net>, Wolfram Sang <wsa@the-dreams.de>
Subject: [PATCH] i2c: piix4: Fix port number check on release
Date: Thu, 7 Dec 2017 12:25:45 +0100 [thread overview]
Message-ID: <20171207122545.1b8e17c6@endymion> (raw)
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 <jdelvare@suse.de>
Fixes: 0fe16195f891 ("i2c: piix4: Fix SMBus port selection for AMD Family 17h chips")
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Wolfram Sang <wsa@the-dreams.de>
---
Sorry for missing this while reviewing the original patch.
drivers/i2c/busses/i2c-piix4.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-4.14.orig/drivers/i2c/busses/i2c-piix4.c 2017-12-07 11:06:05.198260340 +0100
+++ linux-4.14/drivers/i2c/busses/i2c-piix4.c 2017-12-07 12:18:56.405907856 +0100
@@ -989,7 +989,7 @@ static void piix4_adap_remove(struct i2c
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);
--
Jean Delvare
SUSE L3 Support
next reply other threads:[~2017-12-07 11:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-07 11:25 Jean Delvare [this message]
2017-12-07 14:23 ` [PATCH] i2c: piix4: Fix port number check on release Guenter Roeck
2017-12-07 14:33 ` Wolfram Sang
2017-12-07 15:08 ` Jean Delvare
2017-12-12 22:28 ` Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171207122545.1b8e17c6@endymion \
--to=jdelvare@suse.de \
--cc=linux-i2c@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).