Skip to content

Commit 969780f

Browse files
author
Linus Torvalds
committed
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
2 parents ad8f76b + 8750197 commit 969780f

File tree

5 files changed

+24
-33
lines changed

5 files changed

+24
-33
lines changed

Documentation/i2c/busses/i2c-viapro

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ Supported adapters:
77
* VIA Technologies, Inc. VT82C686A/B
88
Datasheet: Sometimes available at the VIA website
99

10-
* VIA Technologies, Inc. VT8231, VT8233, VT8233A, VT8235, VT8237
11-
Datasheet: available on request from Via
10+
* VIA Technologies, Inc. VT8231, VT8233, VT8233A, VT8235, VT8237R
11+
Datasheet: available on request from VIA
1212

1313
Authors:
14-
Frodo Looijaard <frodol@dds.nl>,
15-
Philip Edelbrock <phil@netroedge.com>,
1614
Ky�sti M�lkki <kmalkki@cc.hut.fi>,
1715
Mark D. Studebaker <mdsxyz123@yahoo.com>,
1816
Jean Delvare <khali@linux-fr.org>

Documentation/i2c/writing-clients

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ For now, you can ignore the `flags' parameter. It is there for future use.
412412
release_region(address,FOO_EXTENT);
413413
/* SENSORS ONLY END */
414414
ERROR1:
415-
kfree(new_client);
415+
kfree(data);
416416
ERROR0:
417417
return err;
418418
}
@@ -443,7 +443,7 @@ much simpler than the attachment code, fortunately!
443443
release_region(client->addr,LM78_EXTENT);
444444
/* HYBRID SENSORS CHIP ONLY END */
445445

446-
kfree(data);
446+
kfree(i2c_get_clientdata(client));
447447
return 0;
448448
}
449449

drivers/hwmon/w83627hf.c

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,10 @@ superio_exit(void)
180180
#define W83781D_REG_BANK 0x4E
181181

182182
#define W83781D_REG_CONFIG 0x40
183-
#define W83781D_REG_ALARM1 0x41
184-
#define W83781D_REG_ALARM2 0x42
185-
#define W83781D_REG_ALARM3 0x450
183+
#define W83781D_REG_ALARM1 0x459
184+
#define W83781D_REG_ALARM2 0x45A
185+
#define W83781D_REG_ALARM3 0x45B
186186

187-
#define W83781D_REG_IRQ 0x4C
188187
#define W83781D_REG_BEEP_CONFIG 0x4D
189188
#define W83781D_REG_BEEP_INTS1 0x56
190189
#define W83781D_REG_BEEP_INTS2 0x57
@@ -1370,13 +1369,6 @@ static void w83627hf_init_client(struct i2c_client *client)
13701369
W83781D_REG_TEMP3_CONFIG, tmp & 0xfe);
13711370
}
13721371
}
1373-
1374-
/* enable comparator mode for temp2 and temp3 so
1375-
alarm indication will work correctly */
1376-
i = w83627hf_read_value(client, W83781D_REG_IRQ);
1377-
if (!(i & 0x40))
1378-
w83627hf_write_value(client, W83781D_REG_IRQ,
1379-
i | 0x40);
13801372
}
13811373

13821374
/* Start monitoring */
@@ -1400,7 +1392,7 @@ static struct w83627hf_data *w83627hf_update_device(struct device *dev)
14001392
/* skip missing sensors */
14011393
if (((data->type == w83697hf) && (i == 1)) ||
14021394
((data->type == w83627thf || data->type == w83637hf)
1403-
&& (i == 4 || i == 5)))
1395+
&& (i == 5 || i == 6)))
14041396
continue;
14051397
data->in[i] =
14061398
w83627hf_read_value(client, W83781D_REG_IN(i));

drivers/i2c/busses/i2c-viapro.c

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -142,19 +142,18 @@ static int vt596_transaction(u8 size)
142142
/* Make sure the SMBus host is ready to start transmitting */
143143
if ((temp = inb_p(SMBHSTSTS)) & 0x1F) {
144144
dev_dbg(&vt596_adapter.dev, "SMBus busy (0x%02x). "
145-
"Resetting... ", temp);
145+
"Resetting...\n", temp);
146146

147147
outb_p(temp, SMBHSTSTS);
148148
if ((temp = inb_p(SMBHSTSTS)) & 0x1F) {
149-
printk("Failed! (0x%02x)\n", temp);
149+
dev_err(&vt596_adapter.dev, "SMBus reset failed! "
150+
"(0x%02x)\n", temp);
150151
return -1;
151-
} else {
152-
printk("Successful!\n");
153152
}
154153
}
155154

156155
/* Start the transaction by setting bit 6 */
157-
outb_p(0x40 | (size & 0x3C), SMBHSTCNT);
156+
outb_p(0x40 | size, SMBHSTCNT);
158157

159158
/* We will always wait for a fraction of a second */
160159
do {
@@ -171,7 +170,7 @@ static int vt596_transaction(u8 size)
171170
if (temp & 0x10) {
172171
result = -1;
173172
dev_err(&vt596_adapter.dev, "Transaction failed (0x%02x)\n",
174-
inb_p(SMBHSTCNT) & 0x3C);
173+
size);
175174
}
176175

177176
if (temp & 0x08) {
@@ -180,11 +179,13 @@ static int vt596_transaction(u8 size)
180179
}
181180

182181
if (temp & 0x04) {
182+
int read = inb_p(SMBHSTADD) & 0x01;
183183
result = -1;
184-
/* Quick commands are used to probe for chips, so
185-
errors are expected, and we don't want to frighten the
186-
user. */
187-
if ((inb_p(SMBHSTCNT) & 0x3C) != VT596_QUICK)
184+
/* The quick and receive byte commands are used to probe
185+
for chips, so errors are expected, and we don't want
186+
to frighten the user. */
187+
if (!((size == VT596_QUICK && !read) ||
188+
(size == VT596_BYTE && read)))
188189
dev_err(&vt596_adapter.dev, "Transaction error!\n");
189190
}
190191

@@ -462,9 +463,9 @@ static void __exit i2c_vt596_exit(void)
462463
}
463464
}
464465

465-
MODULE_AUTHOR(
466-
"Frodo Looijaard <frodol@dds.nl> and "
467-
"Philip Edelbrock <phil@netroedge.com>");
466+
MODULE_AUTHOR("Kyosti Malkki <kmalkki@cc.hut.fi>, "
467+
"Mark D. Studebaker <mdsxyz123@yahoo.com> and "
468+
"Jean Delvare <khali@linux-fr.org>");
468469
MODULE_DESCRIPTION("vt82c596 SMBus driver");
469470
MODULE_LICENSE("GPL");
470471

drivers/i2c/chips/ds1337.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,9 @@ static int ds1337_set_datetime(struct i2c_client *client, struct rtc_time *dt)
164164
buf[1] = BIN2BCD(dt->tm_sec);
165165
buf[2] = BIN2BCD(dt->tm_min);
166166
buf[3] = BIN2BCD(dt->tm_hour);
167-
buf[4] = BIN2BCD(dt->tm_wday) + 1;
167+
buf[4] = BIN2BCD(dt->tm_wday + 1);
168168
buf[5] = BIN2BCD(dt->tm_mday);
169-
buf[6] = BIN2BCD(dt->tm_mon) + 1;
169+
buf[6] = BIN2BCD(dt->tm_mon + 1);
170170
val = dt->tm_year;
171171
if (val >= 100) {
172172
val -= 100;

0 commit comments

Comments
 (0)