Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be8992c2 authored by Jean Delvare's avatar Jean Delvare Committed by Greg Kroah-Hartman
Browse files

[PATCH] I2C: Coding style cleanups to via686a



The via686a hardware monitoring driver has infamous coding style at the
moment. I'd like to clean up the mess before I start working on other
changes to this driver. Is the following patch acceptable? No code
change, only coding style (indentation, alignments, trailing white
space, a few parentheses and a typo).

Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 68188ba7
Loading
Loading
Loading
Loading
+140 −136
Original line number Diff line number Diff line
@@ -87,8 +87,10 @@ static const u8 reghyst[] = { 0x3a, 0x3e, 0x1e };
#define VIA686A_REG_TEMP(nr)		(regtemp[nr])
#define VIA686A_REG_TEMP_OVER(nr)	(regover[nr])
#define VIA686A_REG_TEMP_HYST(nr)	(reghyst[nr])
#define VIA686A_REG_TEMP_LOW1	0x4b	// bits 7-6
#define VIA686A_REG_TEMP_LOW23	0x49	// 2 = bits 5-4, 3 = bits 7-6
/* bits 7-6 */
#define VIA686A_REG_TEMP_LOW1	0x4b
/* 2 = bits 5-4, 3 = bits 7-6 */
#define VIA686A_REG_TEMP_LOW23	0x49

#define VIA686A_REG_ALARM1	0x41
#define VIA686A_REG_ALARM2	0x42
@@ -103,7 +105,7 @@ static const u8 reghyst[] = { 0x3a, 0x3e, 0x1e };
#define VIA686A_REG_TEMP_MODE		0x4b
/* We'll just assume that you want to set all 3 simultaneously: */
#define VIA686A_TEMP_MODE_MASK		0x3F
#define VIA686A_TEMP_MODE_CONTINUOUS (0x00)
#define VIA686A_TEMP_MODE_CONTINUOUS	0x00

/* Conversions. Limit checking is only done on the TO_REG
   variants.
@@ -192,7 +194,7 @@ static inline u8 FAN_TO_REG(long rpm, int div)

 Alas, none of the elegant function-fit solutions will work because we
 aren't allowed to use floating point in the kernel and doing it with
 integers doesn't rpovide enough precision.  So we'll do boring old 
 integers doesn't provide enough precision.  So we'll do boring old
 look-up table stuff.  The unofficial data (see below) have effectively
 7-bit resolution (they are rounded to the nearest degree).  I'm assuming
 that the transfer function of the device is monotonic and smooth, so a
@@ -612,7 +614,8 @@ static int via686a_detect(struct i2c_adapter *adapter, int address, int kind)
		address = force_addr & 0xFF00;

	if (force_addr) {
		dev_warn(&adapter->dev,"forcing ISA address 0x%04X\n", address);
		dev_warn(&adapter->dev, "forcing ISA address 0x%04X\n",
			 address);
		if (PCIBIOS_SUCCESSFUL !=
		    pci_write_config_word(s_bridge, VIA686A_BASE_REG, address))
			return -ENODEV;
@@ -818,7 +821,8 @@ static int __devinit via686a_pci_probe(struct pci_dev *dev,

	addr = val & ~(VIA686A_EXTENT - 1);
	if (addr == 0 && force_addr == 0) {
               dev_err(&dev->dev,"base address not set - upgrade BIOS or use force_addr=0xaddr\n");
		dev_err(&dev->dev, "base address not set - upgrade BIOS "
			"or use force_addr=0xaddr\n");
		return -ENODEV;
	}
	if (force_addr)