[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:
committed by
Greg Kroah-Hartman
parent
32c0a520f5
commit
5f49ef8e8c
@@ -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
|
||||
enable ACPI / SMBus or even USB.
|
||||
|
||||
|
||||
|
@@ -46,9 +46,9 @@
|
||||
|
||||
static struct pci_dev *vt596_pdev;
|
||||
|
||||
#define SMBBA1 0x90
|
||||
#define SMBBA2 0x80
|
||||
#define SMBBA3 0xD0
|
||||
#define SMBBA1 0x90
|
||||
#define SMBBA2 0x80
|
||||
#define SMBBA3 0xD0
|
||||
|
||||
/* SMBus address offsets */
|
||||
static unsigned short vt596_smba;
|
||||
@@ -68,26 +68,26 @@ static unsigned short vt596_smba;
|
||||
/* PCI Address Constants */
|
||||
|
||||
/* 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;
|
||||
|
||||
#define SMBHSTCFG (smb_cf_hstcfg)
|
||||
#define SMBSLVC (smb_cf_hstcfg + 1)
|
||||
#define SMBSHDW1 (smb_cf_hstcfg + 2)
|
||||
#define SMBSHDW2 (smb_cf_hstcfg + 3)
|
||||
#define SMBREV (smb_cf_hstcfg + 4)
|
||||
#define SMBHSTCFG (smb_cf_hstcfg)
|
||||
#define SMBSLVC (smb_cf_hstcfg + 1)
|
||||
#define SMBSHDW1 (smb_cf_hstcfg + 2)
|
||||
#define SMBSHDW2 (smb_cf_hstcfg + 3)
|
||||
#define SMBREV (smb_cf_hstcfg + 4)
|
||||
|
||||
/* Other settings */
|
||||
#define MAX_TIMEOUT 500
|
||||
#define ENABLE_INT9 0
|
||||
|
||||
/* VT82C596 constants */
|
||||
#define VT596_QUICK 0x00
|
||||
#define VT596_BYTE 0x04
|
||||
#define VT596_BYTE_DATA 0x08
|
||||
#define VT596_WORD_DATA 0x0C
|
||||
#define VT596_BLOCK_DATA 0x14
|
||||
#define VT596_QUICK 0x00
|
||||
#define VT596_BYTE 0x04
|
||||
#define VT596_BYTE_DATA 0x08
|
||||
#define VT596_WORD_DATA 0x0C
|
||||
#define VT596_BLOCK_DATA 0x14
|
||||
|
||||
|
||||
/* 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 */
|
||||
if ((temp = inb_p(SMBHSTSTS)) & 0x1F) {
|
||||
dev_dbg(&vt596_adapter.dev, "SMBus busy (0x%02x). "
|
||||
"Resetting...\n", temp);
|
||||
"Resetting...\n", temp);
|
||||
|
||||
outb_p(temp, SMBHSTSTS);
|
||||
if ((temp = inb_p(SMBHSTSTS)) & 0x1F) {
|
||||
@@ -185,8 +185,8 @@ static int vt596_transaction(void)
|
||||
|
||||
/* Return -1 on error. */
|
||||
static s32 vt596_access(struct i2c_adapter *adap, u16 addr,
|
||||
unsigned short flags, char read_write, u8 command,
|
||||
int size, union i2c_smbus_data *data)
|
||||
unsigned short flags, char read_write, u8 command,
|
||||
int size, union i2c_smbus_data *data)
|
||||
{
|
||||
int i, len;
|
||||
|
||||
@@ -333,10 +333,10 @@ static int __devinit vt596_probe(struct pci_dev *pdev,
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
found:
|
||||
found:
|
||||
if (!request_region(vt596_smba, 8, "viapro-smbus")) {
|
||||
dev_err(&pdev->dev, "SMBus region 0x%x already in use!\n",
|
||||
vt596_smba);
|
||||
vt596_smba);
|
||||
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_byte(pdev, SMBHSTCFG, temp | 0x01);
|
||||
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) {
|
||||
if (force) {
|
||||
/* 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;
|
||||
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);
|
||||
if (i2c_add_adapter(&vt596_adapter)) {
|
||||
@@ -395,7 +395,7 @@ static int __devinit vt596_probe(struct pci_dev *pdev,
|
||||
*/
|
||||
return -ENODEV;
|
||||
|
||||
release_region:
|
||||
release_region:
|
||||
release_region(vt596_smba, 8);
|
||||
return error;
|
||||
}
|
||||
@@ -420,7 +420,7 @@ static struct pci_device_id vt596_ids[] = {
|
||||
{ 0, }
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE (pci, vt596_ids);
|
||||
MODULE_DEVICE_TABLE(pci, vt596_ids);
|
||||
|
||||
static struct pci_driver vt596_driver = {
|
||||
.name = "vt596_smbus",
|
||||
|
Reference in New Issue
Block a user