aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-prosavage.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-10-28 17:14:57 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-28 17:14:57 -0400
commit20731945ae743034353a88c307920d1f16cf8ac8 (patch)
tree132c796fe3a167dece8cec7a40b1d5dd83a68bc8 /drivers/i2c/busses/i2c-prosavage.c
parent406119f49d4a6cf8b6eee639128e0575a95065e3 (diff)
parenta9d1b24d91f91b77db3da8aeacb414764f789b9c (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
Diffstat (limited to 'drivers/i2c/busses/i2c-prosavage.c')
-rw-r--r--drivers/i2c/busses/i2c-prosavage.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/i2c/busses/i2c-prosavage.c b/drivers/i2c/busses/i2c-prosavage.c
index 83fd16d61ce5..42cb1d8ca659 100644
--- a/drivers/i2c/busses/i2c-prosavage.c
+++ b/drivers/i2c/busses/i2c-prosavage.c
@@ -83,11 +83,6 @@ struct s_i2c_chip {
83/* 83/*
84 * i2c configuration 84 * i2c configuration
85 */ 85 */
86#ifndef I2C_HW_B_S3VIA
87#define I2C_HW_B_S3VIA 0x18 /* S3VIA ProSavage adapter */
88#endif
89
90/* delays */
91#define CYCLE_DELAY 10 86#define CYCLE_DELAY 10
92#define TIMEOUT (HZ / 2) 87#define TIMEOUT (HZ / 2)
93 88
@@ -241,14 +236,12 @@ static int __devinit prosavage_probe(struct pci_dev *dev, const struct pci_devic
241 struct s_i2c_chip *chip; 236 struct s_i2c_chip *chip;
242 struct s_i2c_bus *bus; 237 struct s_i2c_bus *bus;
243 238
244 pci_set_drvdata(dev, kmalloc(sizeof(struct s_i2c_chip), GFP_KERNEL)); 239 pci_set_drvdata(dev, kzalloc(sizeof(struct s_i2c_chip), GFP_KERNEL));
245 chip = (struct s_i2c_chip *)pci_get_drvdata(dev); 240 chip = (struct s_i2c_chip *)pci_get_drvdata(dev);
246 if (chip == NULL) { 241 if (chip == NULL) {
247 return -ENOMEM; 242 return -ENOMEM;
248 } 243 }
249 244
250 memset(chip, 0, sizeof(struct s_i2c_chip));
251
252 base = dev->resource[0].start & PCI_BASE_ADDRESS_MEM_MASK; 245 base = dev->resource[0].start & PCI_BASE_ADDRESS_MEM_MASK;
253 len = dev->resource[0].end - base + 1; 246 len = dev->resource[0].end - base + 1;
254 chip->mmio = ioremap_nocache(base, len); 247 chip->mmio = ioremap_nocache(base, len);
@@ -308,6 +301,7 @@ static struct pci_device_id prosavage_pci_tbl[] = {
308MODULE_DEVICE_TABLE (pci, prosavage_pci_tbl); 301MODULE_DEVICE_TABLE (pci, prosavage_pci_tbl);
309 302
310static struct pci_driver prosavage_driver = { 303static struct pci_driver prosavage_driver = {
304 .owner = THIS_MODULE,
311 .name = "prosavage_smbus", 305 .name = "prosavage_smbus",
312 .id_table = prosavage_pci_tbl, 306 .id_table = prosavage_pci_tbl,
313 .probe = prosavage_probe, 307 .probe = prosavage_probe,