aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-ali1563.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-ali1563.c')
-rw-r--r--drivers/i2c/busses/i2c-ali1563.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/i2c/busses/i2c-ali1563.c b/drivers/i2c/busses/i2c-ali1563.c
index 8e1e3f8e40a4..3b0e79b1e871 100644
--- a/drivers/i2c/busses/i2c-ali1563.c
+++ b/drivers/i2c/busses/i2c-ali1563.c
@@ -328,7 +328,6 @@ static int __devinit ali1563_setup(struct pci_dev * dev)
328 u16 ctrl; 328 u16 ctrl;
329 329
330 pci_read_config_word(dev,ALI1563_SMBBA,&ctrl); 330 pci_read_config_word(dev,ALI1563_SMBBA,&ctrl);
331 printk("ali1563: SMBus control = %04x\n",ctrl);
332 331
333 /* Check if device is even enabled first */ 332 /* Check if device is even enabled first */
334 if (!(ctrl & ALI1563_SMB_IOEN)) { 333 if (!(ctrl & ALI1563_SMB_IOEN)) {
@@ -353,9 +352,11 @@ static int __devinit ali1563_setup(struct pci_dev * dev)
353 } 352 }
354 if (!request_region(ali1563_smba, ALI1563_SMB_IOSIZE, 353 if (!request_region(ali1563_smba, ALI1563_SMB_IOSIZE,
355 ali1563_pci_driver.name)) { 354 ali1563_pci_driver.name)) {
356 dev_warn(&dev->dev,"Could not allocate I/O space"); 355 dev_err(&dev->dev, "Could not allocate I/O space at 0x%04x\n",
356 ali1563_smba);
357 goto Err; 357 goto Err;
358 } 358 }
359 dev_info(&dev->dev, "Found ALi1563 SMBus at 0x%04x\n", ali1563_smba);
359 360
360 return 0; 361 return 0;
361Err: 362Err:
@@ -384,13 +385,18 @@ static int __devinit ali1563_probe(struct pci_dev * dev,
384 int error; 385 int error;
385 386
386 if ((error = ali1563_setup(dev))) 387 if ((error = ali1563_setup(dev)))
387 return error; 388 goto exit;
388 ali1563_adapter.dev.parent = &dev->dev; 389 ali1563_adapter.dev.parent = &dev->dev;
389 sprintf(ali1563_adapter.name,"SMBus ALi 1563 Adapter @ %04x", 390 sprintf(ali1563_adapter.name,"SMBus ALi 1563 Adapter @ %04x",
390 ali1563_smba); 391 ali1563_smba);
391 if ((error = i2c_add_adapter(&ali1563_adapter))) 392 if ((error = i2c_add_adapter(&ali1563_adapter)))
392 ali1563_shutdown(dev); 393 goto exit_shutdown;
393 printk("%s: Returning %d\n",__FUNCTION__,error); 394 return 0;
395
396exit_shutdown:
397 ali1563_shutdown(dev);
398exit:
399 dev_warn(&dev->dev, "ALi1563 SMBus probe failed (%d)\n", error);
394 return error; 400 return error;
395} 401}
396 402