[PATCH] i2c-viapro: Coding style fixes

Before I go on cleaning up and improving the i2c-viapro driver, let's
fix all the coding style issues: mostly trailing white space, and
spaces used where tabs should be.

Signed-off-by: Jean Delvare <khali@linux-fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 Documentation/i2c/busses/i2c-viapro |   12 ++---
 drivers/i2c/busses/i2c-viapro.c     |   76 ++++++++++++++++++------------------
 2 files changed, 43 insertions(+), 45 deletions(-)
This commit is contained in:
Jean Delvare
2005-09-22 21:50:47 +02:00
committed by Greg Kroah-Hartman
parent 32c0a520f5
commit 5f49ef8e8c
2 changed files with 43 additions and 45 deletions

View File

@@ -43,5 +43,3 @@ Your lspci -n listing must show one of these :
If none of these show up, you should look in the BIOS for settings like If none of these show up, you should look in the BIOS for settings like
enable ACPI / SMBus or even USB. enable ACPI / SMBus or even USB.

View File

@@ -46,9 +46,9 @@
static struct pci_dev *vt596_pdev; static struct pci_dev *vt596_pdev;
#define SMBBA1 0x90 #define SMBBA1 0x90
#define SMBBA2 0x80 #define SMBBA2 0x80
#define SMBBA3 0xD0 #define SMBBA3 0xD0
/* SMBus address offsets */ /* SMBus address offsets */
static unsigned short vt596_smba; static unsigned short vt596_smba;
@@ -68,26 +68,26 @@ static unsigned short vt596_smba;
/* PCI Address Constants */ /* PCI Address Constants */
/* SMBus data in configuration space can be found in two places, /* SMBus data in configuration space can be found in two places,
We try to select the better one*/ We try to select the better one */
static unsigned short smb_cf_hstcfg = 0xD2; static unsigned short smb_cf_hstcfg = 0xD2;
#define SMBHSTCFG (smb_cf_hstcfg) #define SMBHSTCFG (smb_cf_hstcfg)
#define SMBSLVC (smb_cf_hstcfg + 1) #define SMBSLVC (smb_cf_hstcfg + 1)
#define SMBSHDW1 (smb_cf_hstcfg + 2) #define SMBSHDW1 (smb_cf_hstcfg + 2)
#define SMBSHDW2 (smb_cf_hstcfg + 3) #define SMBSHDW2 (smb_cf_hstcfg + 3)
#define SMBREV (smb_cf_hstcfg + 4) #define SMBREV (smb_cf_hstcfg + 4)
/* Other settings */ /* Other settings */
#define MAX_TIMEOUT 500 #define MAX_TIMEOUT 500
#define ENABLE_INT9 0 #define ENABLE_INT9 0
/* VT82C596 constants */ /* VT82C596 constants */
#define VT596_QUICK 0x00 #define VT596_QUICK 0x00
#define VT596_BYTE 0x04 #define VT596_BYTE 0x04
#define VT596_BYTE_DATA 0x08 #define VT596_BYTE_DATA 0x08
#define VT596_WORD_DATA 0x0C #define VT596_WORD_DATA 0x0C
#define VT596_BLOCK_DATA 0x14 #define VT596_BLOCK_DATA 0x14
/* If force is set to anything different from 0, we forcibly enable the /* If force is set to anything different from 0, we forcibly enable the
@@ -122,7 +122,7 @@ static int vt596_transaction(void)
/* Make sure the SMBus host is ready to start transmitting */ /* Make sure the SMBus host is ready to start transmitting */
if ((temp = inb_p(SMBHSTSTS)) & 0x1F) { if ((temp = inb_p(SMBHSTSTS)) & 0x1F) {
dev_dbg(&vt596_adapter.dev, "SMBus busy (0x%02x). " dev_dbg(&vt596_adapter.dev, "SMBus busy (0x%02x). "
"Resetting...\n", temp); "Resetting...\n", temp);
outb_p(temp, SMBHSTSTS); outb_p(temp, SMBHSTSTS);
if ((temp = inb_p(SMBHSTSTS)) & 0x1F) { if ((temp = inb_p(SMBHSTSTS)) & 0x1F) {
@@ -185,8 +185,8 @@ static int vt596_transaction(void)
/* Return -1 on error. */ /* Return -1 on error. */
static s32 vt596_access(struct i2c_adapter *adap, u16 addr, static s32 vt596_access(struct i2c_adapter *adap, u16 addr,
unsigned short flags, char read_write, u8 command, unsigned short flags, char read_write, u8 command,
int size, union i2c_smbus_data *data) int size, union i2c_smbus_data *data)
{ {
int i, len; int i, len;
@@ -333,10 +333,10 @@ static int __devinit vt596_probe(struct pci_dev *pdev,
return -ENODEV; return -ENODEV;
} }
found: found:
if (!request_region(vt596_smba, 8, "viapro-smbus")) { if (!request_region(vt596_smba, 8, "viapro-smbus")) {
dev_err(&pdev->dev, "SMBus region 0x%x already in use!\n", dev_err(&pdev->dev, "SMBus region 0x%x already in use!\n",
vt596_smba); vt596_smba);
return -ENODEV; return -ENODEV;
} }
@@ -348,7 +348,7 @@ static int __devinit vt596_probe(struct pci_dev *pdev,
pci_write_config_word(pdev, id->driver_data, vt596_smba); pci_write_config_word(pdev, id->driver_data, vt596_smba);
pci_write_config_byte(pdev, SMBHSTCFG, temp | 0x01); pci_write_config_byte(pdev, SMBHSTCFG, temp | 0x01);
dev_warn(&pdev->dev, "WARNING: SMBus interface set to new " dev_warn(&pdev->dev, "WARNING: SMBus interface set to new "
"address 0x%04x!\n", vt596_smba); "address 0x%04x!\n", vt596_smba);
} else if ((temp & 1) == 0) { } else if ((temp & 1) == 0) {
if (force) { if (force) {
/* NOTE: This assumes I/O space and other allocations /* NOTE: This assumes I/O space and other allocations
@@ -381,7 +381,7 @@ static int __devinit vt596_probe(struct pci_dev *pdev,
vt596_adapter.dev.parent = &pdev->dev; vt596_adapter.dev.parent = &pdev->dev;
snprintf(vt596_adapter.name, I2C_NAME_SIZE, snprintf(vt596_adapter.name, I2C_NAME_SIZE,
"SMBus Via Pro adapter at %04x", vt596_smba); "SMBus Via Pro adapter at %04x", vt596_smba);
vt596_pdev = pci_dev_get(pdev); vt596_pdev = pci_dev_get(pdev);
if (i2c_add_adapter(&vt596_adapter)) { if (i2c_add_adapter(&vt596_adapter)) {
@@ -395,7 +395,7 @@ static int __devinit vt596_probe(struct pci_dev *pdev,
*/ */
return -ENODEV; return -ENODEV;
release_region: release_region:
release_region(vt596_smba, 8); release_region(vt596_smba, 8);
return error; return error;
} }
@@ -420,7 +420,7 @@ static struct pci_device_id vt596_ids[] = {
{ 0, } { 0, }
}; };
MODULE_DEVICE_TABLE (pci, vt596_ids); MODULE_DEVICE_TABLE(pci, vt596_ids);
static struct pci_driver vt596_driver = { static struct pci_driver vt596_driver = {
.name = "vt596_smbus", .name = "vt596_smbus",