diff options
author | Jean Delvare <khali@linux-fr.org> | 2010-10-28 14:31:46 -0400 |
---|---|---|
committer | Jean Delvare <khali@endymion.delvare> | 2010-10-28 14:31:46 -0400 |
commit | 86ef4d2fd5921ff0bcfd1c0d88403a08862087bc (patch) | |
tree | 578d4918c3438c9c4eb6b1bbeac8891f55e2983f /drivers/hwmon | |
parent | b2cc528e5838d744892b30c5104bd872a439088f (diff) |
hwmon: (w83795) Add const markers
Attribute structures can be made const. Same for the I2C address
list.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/w83795.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/hwmon/w83795.c b/drivers/hwmon/w83795.c index 00d64b0c200f..b45416011c2a 100644 --- a/drivers/hwmon/w83795.c +++ b/drivers/hwmon/w83795.c | |||
@@ -36,7 +36,9 @@ | |||
36 | #include <linux/delay.h> | 36 | #include <linux/delay.h> |
37 | 37 | ||
38 | /* Addresses to scan */ | 38 | /* Addresses to scan */ |
39 | static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, 0x2f, I2C_CLIENT_END }; | 39 | static const unsigned short normal_i2c[] = { |
40 | 0x2c, 0x2d, 0x2e, 0x2f, I2C_CLIENT_END | ||
41 | }; | ||
40 | 42 | ||
41 | 43 | ||
42 | static int reset; | 44 | static int reset; |
@@ -70,7 +72,7 @@ MODULE_PARM_DESC(reset, "Set to 1 to reset chip, not recommended"); | |||
70 | #define TEMP_CTRL_SHIFT 4 | 72 | #define TEMP_CTRL_SHIFT 4 |
71 | #define TEMP_CTRL_HASIN_SHIFT 5 | 73 | #define TEMP_CTRL_HASIN_SHIFT 5 |
72 | /* temp mode may effect VSEN17-12 (in20-15) */ | 74 | /* temp mode may effect VSEN17-12 (in20-15) */ |
73 | static u16 W83795_REG_TEMP_CTRL[][6] = { | 75 | static const u16 W83795_REG_TEMP_CTRL[][6] = { |
74 | /* Disable, TD, VSEN, TR, register shift value, has_in shift num */ | 76 | /* Disable, TD, VSEN, TR, register shift value, has_in shift num */ |
75 | {0x00, 0x01, 0x02, 0x03, 0, 17}, /* TR1 */ | 77 | {0x00, 0x01, 0x02, 0x03, 0, 17}, /* TR1 */ |
76 | {0x00, 0x04, 0x08, 0x0C, 2, 18}, /* TR2 */ | 78 | {0x00, 0x04, 0x08, 0x0C, 2, 18}, /* TR2 */ |
@@ -87,7 +89,7 @@ static u16 W83795_REG_TEMP_CTRL[][6] = { | |||
87 | #define TEMP_WARN_HYST 4 | 89 | #define TEMP_WARN_HYST 4 |
88 | /* only crit and crit_hyst affect real-time alarm status | 90 | /* only crit and crit_hyst affect real-time alarm status |
89 | * current crit crit_hyst warn warn_hyst */ | 91 | * current crit crit_hyst warn warn_hyst */ |
90 | static u16 W83795_REG_TEMP[][5] = { | 92 | static const u16 W83795_REG_TEMP[][5] = { |
91 | {0x21, 0x96, 0x97, 0x98, 0x99}, /* TD1/TR1 */ | 93 | {0x21, 0x96, 0x97, 0x98, 0x99}, /* TD1/TR1 */ |
92 | {0x22, 0x9a, 0x9b, 0x9c, 0x9d}, /* TD2/TR2 */ | 94 | {0x22, 0x9a, 0x9b, 0x9c, 0x9d}, /* TD2/TR2 */ |
93 | {0x23, 0x9e, 0x9f, 0xa0, 0xa1}, /* TD3/TR3 */ | 95 | {0x23, 0x9e, 0x9f, 0xa0, 0xa1}, /* TD3/TR3 */ |
@@ -1593,7 +1595,7 @@ static struct sensor_device_attribute_2 w83795_in[][5] = { | |||
1593 | SENSOR_ATTR_IN(20), | 1595 | SENSOR_ATTR_IN(20), |
1594 | }; | 1596 | }; |
1595 | 1597 | ||
1596 | static struct sensor_device_attribute_2 w83795_fan[][4] = { | 1598 | static const struct sensor_device_attribute_2 w83795_fan[][4] = { |
1597 | SENSOR_ATTR_FAN(1), | 1599 | SENSOR_ATTR_FAN(1), |
1598 | SENSOR_ATTR_FAN(2), | 1600 | SENSOR_ATTR_FAN(2), |
1599 | SENSOR_ATTR_FAN(3), | 1601 | SENSOR_ATTR_FAN(3), |
@@ -1610,7 +1612,7 @@ static struct sensor_device_attribute_2 w83795_fan[][4] = { | |||
1610 | SENSOR_ATTR_FAN(14), | 1612 | SENSOR_ATTR_FAN(14), |
1611 | }; | 1613 | }; |
1612 | 1614 | ||
1613 | static struct sensor_device_attribute_2 w83795_temp[][29] = { | 1615 | static const struct sensor_device_attribute_2 w83795_temp[][29] = { |
1614 | SENSOR_ATTR_TEMP(1), | 1616 | SENSOR_ATTR_TEMP(1), |
1615 | SENSOR_ATTR_TEMP(2), | 1617 | SENSOR_ATTR_TEMP(2), |
1616 | SENSOR_ATTR_TEMP(3), | 1618 | SENSOR_ATTR_TEMP(3), |
@@ -1619,7 +1621,7 @@ static struct sensor_device_attribute_2 w83795_temp[][29] = { | |||
1619 | SENSOR_ATTR_TEMP(6), | 1621 | SENSOR_ATTR_TEMP(6), |
1620 | }; | 1622 | }; |
1621 | 1623 | ||
1622 | static struct sensor_device_attribute_2 w83795_dts[][8] = { | 1624 | static const struct sensor_device_attribute_2 w83795_dts[][8] = { |
1623 | SENSOR_ATTR_DTS(7), | 1625 | SENSOR_ATTR_DTS(7), |
1624 | SENSOR_ATTR_DTS(8), | 1626 | SENSOR_ATTR_DTS(8), |
1625 | SENSOR_ATTR_DTS(9), | 1627 | SENSOR_ATTR_DTS(9), |
@@ -1630,7 +1632,7 @@ static struct sensor_device_attribute_2 w83795_dts[][8] = { | |||
1630 | SENSOR_ATTR_DTS(14), | 1632 | SENSOR_ATTR_DTS(14), |
1631 | }; | 1633 | }; |
1632 | 1634 | ||
1633 | static struct sensor_device_attribute_2 w83795_pwm[][7] = { | 1635 | static const struct sensor_device_attribute_2 w83795_pwm[][7] = { |
1634 | SENSOR_ATTR_PWM(1), | 1636 | SENSOR_ATTR_PWM(1), |
1635 | SENSOR_ATTR_PWM(2), | 1637 | SENSOR_ATTR_PWM(2), |
1636 | SENSOR_ATTR_PWM(3), | 1638 | SENSOR_ATTR_PWM(3), |
@@ -1641,7 +1643,7 @@ static struct sensor_device_attribute_2 w83795_pwm[][7] = { | |||
1641 | SENSOR_ATTR_PWM(8), | 1643 | SENSOR_ATTR_PWM(8), |
1642 | }; | 1644 | }; |
1643 | 1645 | ||
1644 | static struct sensor_device_attribute_2 sda_single_files[] = { | 1646 | static const struct sensor_device_attribute_2 sda_single_files[] = { |
1645 | SENSOR_ATTR_2(chassis, S_IWUSR | S_IRUGO, show_alarm_beep, | 1647 | SENSOR_ATTR_2(chassis, S_IWUSR | S_IRUGO, show_alarm_beep, |
1646 | store_chassis_clear, ALARM_STATUS, 46), | 1648 | store_chassis_clear, ALARM_STATUS, 46), |
1647 | SENSOR_ATTR_2(beep_enable, S_IWUSR | S_IRUGO, show_beep_enable, | 1649 | SENSOR_ATTR_2(beep_enable, S_IWUSR | S_IRUGO, show_beep_enable, |