[PATCH 2/4] hwmon: f71882fg: prepare for addition of watchdog support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rename the `address' variable that's used in some places to hwmon_addr
to indicate it refers to the hardware monitor (HWMON in datasheet)
"logical device" of the chip.

Signed-off-by: Giel van Schijndel <me@xxxxxxxxx>
---
 drivers/hwmon/f71882fg.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c
index b290b87..7b31e14 100644
--- a/drivers/hwmon/f71882fg.c
+++ b/drivers/hwmon/f71882fg.c
@@ -2233,7 +2233,7 @@ static int f71882fg_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static int __init f71882fg_find(int sioaddr, unsigned short *address,
+static int __init f71882fg_find(int sioaddr, unsigned short *hwmon_addr,
 	struct f71882fg_sio_data *sio_data)
 {
 	int err = -ENODEV;
@@ -2290,16 +2290,16 @@ static int __init f71882fg_find(int sioaddr, unsigned short *address,
 		goto exit;
 	}
 
-	*address = superio_inw(sioaddr, SIO_REG_ADDR);
-	if (*address == 0) {
+	*hwmon_addr = superio_inw(sioaddr, SIO_REG_ADDR);
+	if (*hwmon_addr == 0) {
 		printk(KERN_WARNING DRVNAME ": Base address not set\n");
 		goto exit;
 	}
-	*address &= ~(REGION_LENGTH - 1);	/* Ignore 3 LSB */
+	*hwmon_addr &= ~(REGION_LENGTH - 1);	/* Ignore 3 LSB */
 
 	err = 0;
 	printk(KERN_INFO DRVNAME ": Found %s chip at %#x, revision %d\n",
-		f71882fg_names[sio_data->type],	(unsigned int)*address,
+		f71882fg_names[sio_data->type],	(unsigned int)*hwmon_addr,
 		(int)superio_inb(sioaddr, SIO_REG_DEVREV));
 exit:
 	superio_exit(sioaddr);
@@ -2307,17 +2307,17 @@ exit:
 	return err;
 }
 
-static int __init f71882fg_device_add(unsigned short address,
+static int __init f71882fg_device_add(unsigned short hwmon_addr,
 	const struct f71882fg_sio_data *sio_data)
 {
 	struct resource res = {
-		.start	= address,
-		.end	= address + REGION_LENGTH - 1,
+		.start	= hwmon_addr,
+		.end	= hwmon_addr + REGION_LENGTH - 1,
 		.flags	= IORESOURCE_IO,
 	};
 	int err;
 
-	f71882fg_pdev = platform_device_alloc(DRVNAME, address);
+	f71882fg_pdev = platform_device_alloc(DRVNAME, hwmon_addr);
 	if (!f71882fg_pdev)
 		return -ENOMEM;
 
@@ -2357,14 +2357,14 @@ static int __init f71882fg_init(void)
 {
 	static const unsigned short addrs[] = { 0x2e, 0x4e };
 	int err = -ENODEV;
-	unsigned short address = /* shut up compiler */ 0;
+	unsigned short hwmon_addr = /* shut up compiler */ 0;
 	struct f71882fg_sio_data sio_data;
 	int i;
 
 	memset(&sio_data, 0, sizeof(sio_data));
 
 	for (i = 0; i < ARRAY_SIZE(addrs); i++) {
-		err = f71882fg_find(addrs[i], &address, &sio_data);
+		err = f71882fg_find(addrs[i], &hwmon_addr, &sio_data);
 		if (err == 0)
 			break;
 	}
@@ -2375,7 +2375,7 @@ static int __init f71882fg_init(void)
 	if (err)
 		goto exit;
 
-	err = f71882fg_device_add(address, &sio_data);
+	err = f71882fg_device_add(hwmon_addr, &sio_data);
 	if (err)
 		goto exit_driver;
 
-- 
1.6.4.4


_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux