summaryrefslogtreecommitdiff
path: root/drivers/hwmon/pc87360.c
diff options
context:
space:
mode:
authorJim Cromie <jim.cromie@gmail.com>2008-10-19 07:27:33 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-20 19:52:35 +0400
commit2a32ec2500514109754e07721d9d5d431a706a31 (patch)
treeedc33228e90b6fd064f4ccd56edac489f05c0a4a /drivers/hwmon/pc87360.c
parentb267e8cdc638dfa53360d532aa56afa0ec12e6a5 (diff)
downloadlinux-2a32ec2500514109754e07721d9d5d431a706a31.tar.xz
hwmon/pc87360 separate alarm files: define LDNI_MAX const
Driver handles 3 logical devices in fixed length array. Give this a define-d constant. Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/hwmon/pc87360.c')
-rw-r--r--drivers/hwmon/pc87360.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/hwmon/pc87360.c b/drivers/hwmon/pc87360.c
index c80ee5f056ba..7153b630ad4c 100644
--- a/drivers/hwmon/pc87360.c
+++ b/drivers/hwmon/pc87360.c
@@ -75,7 +75,8 @@ MODULE_PARM_DESC(force_id, "Override the detected device ID");
#define FSCM 0x09 /* Logical device: fans */
#define VLM 0x0d /* Logical device: voltages */
#define TMS 0x0e /* Logical device: temperatures */
-static const u8 logdev[3] = { FSCM, VLM, TMS };
+#define LDNI_MAX 3
+static const u8 logdev[LDNI_MAX] = { FSCM, VLM, TMS };
#define LD_FAN 0
#define LD_IN 1
@@ -1074,7 +1075,7 @@ static int __devinit pc87360_probe(struct platform_device *pdev)
mutex_init(&data->update_lock);
platform_set_drvdata(pdev, data);
- for (i = 0; i < 3; i++) {
+ for (i = 0; i < LDNI_MAX; i++) {
if (((data->address[i] = extra_isa[i]))
&& !request_region(extra_isa[i], PC87360_EXTENT,
pc87360_driver.driver.name)) {