diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-prosavage.c')
-rw-r--r-- | drivers/i2c/busses/i2c-prosavage.c | 10 |
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[] = { | |||
308 | MODULE_DEVICE_TABLE (pci, prosavage_pci_tbl); | 301 | MODULE_DEVICE_TABLE (pci, prosavage_pci_tbl); |
309 | 302 | ||
310 | static struct pci_driver prosavage_driver = { | 303 | static 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, |