aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/chips/asb100.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/chips/asb100.c')
-rw-r--r--drivers/i2c/chips/asb100.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/i2c/chips/asb100.c b/drivers/i2c/chips/asb100.c
index 4a47b4493e34..70d996d6fe0a 100644
--- a/drivers/i2c/chips/asb100.c
+++ b/drivers/i2c/chips/asb100.c
@@ -42,6 +42,7 @@
42#include <linux/i2c-sensor.h> 42#include <linux/i2c-sensor.h>
43#include <linux/i2c-vid.h> 43#include <linux/i2c-vid.h>
44#include <linux/init.h> 44#include <linux/init.h>
45#include <linux/jiffies.h>
45#include "lm75.h" 46#include "lm75.h"
46 47
47/* 48/*
@@ -168,8 +169,6 @@ static int ASB100_PWM_FROM_REG(u8 reg)
168 return reg * 16; 169 return reg * 16;
169} 170}
170 171
171#define ALARMS_FROM_REG(val) (val)
172
173#define DIV_FROM_REG(val) (1 << (val)) 172#define DIV_FROM_REG(val) (1 << (val))
174 173
175/* FAN DIV: 1, 2, 4, or 8 (defaults to 2) 174/* FAN DIV: 1, 2, 4, or 8 (defaults to 2)
@@ -556,7 +555,7 @@ device_create_file(&client->dev, &dev_attr_vrm);
556static ssize_t show_alarms(struct device *dev, struct device_attribute *attr, char *buf) 555static ssize_t show_alarms(struct device *dev, struct device_attribute *attr, char *buf)
557{ 556{
558 struct asb100_data *data = asb100_update_device(dev); 557 struct asb100_data *data = asb100_update_device(dev);
559 return sprintf(buf, "%d\n", ALARMS_FROM_REG(data->alarms)); 558 return sprintf(buf, "%u\n", data->alarms);
560} 559}
561 560
562static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL); 561static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL);