diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hwmon/Kconfig | 10 | ||||
-rw-r--r-- | drivers/hwmon/adm9240.c | 4 | ||||
-rw-r--r-- | drivers/hwmon/lm78.c | 12 | ||||
-rw-r--r-- | drivers/hwmon/smsc47m1.c | 11 | ||||
-rw-r--r-- | drivers/hwmon/w83627ehf.c | 11 | ||||
-rw-r--r-- | drivers/hwmon/w83781d.c | 30 | ||||
-rw-r--r-- | drivers/hwmon/w83791d.c | 85 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-isa.c | 2 |
8 files changed, 102 insertions, 63 deletions
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index 9b88b25b6edb..e76d91906c99 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig | |||
@@ -95,11 +95,13 @@ config SENSORS_ADM9240 | |||
95 | will be called adm9240. | 95 | will be called adm9240. |
96 | 96 | ||
97 | config SENSORS_K8TEMP | 97 | config SENSORS_K8TEMP |
98 | tristate "AMD K8 processor sensor" | 98 | tristate "AMD Athlon64/FX or Opteron temperature sensor" |
99 | depends on HWMON && X86 && PCI && EXPERIMENTAL | 99 | depends on HWMON && X86 && PCI && EXPERIMENTAL |
100 | help | 100 | help |
101 | If you say yes here you get support for the temperature | 101 | If you say yes here you get support for the temperature |
102 | sensor(s) inside your AMD K8 CPU. | 102 | sensor(s) inside your CPU. Supported is whole AMD K8 |
103 | microarchitecture. Please note that you will need at least | ||
104 | lm-sensors 2.10.1 for proper userspace support. | ||
103 | 105 | ||
104 | This driver can also be built as a module. If so, the module | 106 | This driver can also be built as a module. If so, the module |
105 | will be called k8temp. | 107 | will be called k8temp. |
@@ -369,8 +371,8 @@ config SENSORS_SMSC47M1 | |||
369 | help | 371 | help |
370 | If you say yes here you get support for the integrated fan | 372 | If you say yes here you get support for the integrated fan |
371 | monitoring and control capabilities of the SMSC LPC47B27x, | 373 | monitoring and control capabilities of the SMSC LPC47B27x, |
372 | LPC47M10x, LPC47M13x, LPC47M14x, LPC47M15x, LPC47M192 and | 374 | LPC47M10x, LPC47M112, LPC47M13x, LPC47M14x, LPC47M15x, |
373 | LPC47M997 chips. | 375 | LPC47M192 and LPC47M997 chips. |
374 | 376 | ||
375 | The temperature and voltage sensor features of the LPC47M192 | 377 | The temperature and voltage sensor features of the LPC47M192 |
376 | and LPC47M997 are supported by another driver, select also | 378 | and LPC47M997 are supported by another driver, select also |
diff --git a/drivers/hwmon/adm9240.c b/drivers/hwmon/adm9240.c index 377961c4a41e..aad594adf0c7 100644 --- a/drivers/hwmon/adm9240.c +++ b/drivers/hwmon/adm9240.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * Copyright (C) 1999 Frodo Looijaard <frodol@dds.nl> | 5 | * Copyright (C) 1999 Frodo Looijaard <frodol@dds.nl> |
6 | * Philip Edelbrock <phil@netroedge.com> | 6 | * Philip Edelbrock <phil@netroedge.com> |
7 | * Copyright (C) 2003 Michiel Rook <michiel@grendelproject.nl> | 7 | * Copyright (C) 2003 Michiel Rook <michiel@grendelproject.nl> |
8 | * Copyright (C) 2005 Grant Coady <gcoady@gmail.com> with valuable | 8 | * Copyright (C) 2005 Grant Coady <gcoady.lk@gmail.com> with valuable |
9 | * guidance from Jean Delvare | 9 | * guidance from Jean Delvare |
10 | * | 10 | * |
11 | * Driver supports Analog Devices ADM9240 | 11 | * Driver supports Analog Devices ADM9240 |
@@ -774,7 +774,7 @@ static void __exit sensors_adm9240_exit(void) | |||
774 | } | 774 | } |
775 | 775 | ||
776 | MODULE_AUTHOR("Michiel Rook <michiel@grendelproject.nl>, " | 776 | MODULE_AUTHOR("Michiel Rook <michiel@grendelproject.nl>, " |
777 | "Grant Coady <gcoady@gmail.com> and others"); | 777 | "Grant Coady <gcoady.lk@gmail.com> and others"); |
778 | MODULE_DESCRIPTION("ADM9240/DS1780/LM81 driver"); | 778 | MODULE_DESCRIPTION("ADM9240/DS1780/LM81 driver"); |
779 | MODULE_LICENSE("GPL"); | 779 | MODULE_LICENSE("GPL"); |
780 | 780 | ||
diff --git a/drivers/hwmon/lm78.c b/drivers/hwmon/lm78.c index ac1b746df6d0..73bc2ffc598d 100644 --- a/drivers/hwmon/lm78.c +++ b/drivers/hwmon/lm78.c | |||
@@ -815,18 +815,18 @@ static int __init sm_lm78_init(void) | |||
815 | if (res) | 815 | if (res) |
816 | return res; | 816 | return res; |
817 | 817 | ||
818 | res = i2c_isa_add_driver(&lm78_isa_driver); | 818 | /* Don't exit if this one fails, we still want the I2C variants |
819 | if (res) { | 819 | to work! */ |
820 | i2c_del_driver(&lm78_driver); | 820 | if (i2c_isa_add_driver(&lm78_isa_driver)) |
821 | return res; | 821 | isa_address = 0; |
822 | } | ||
823 | 822 | ||
824 | return 0; | 823 | return 0; |
825 | } | 824 | } |
826 | 825 | ||
827 | static void __exit sm_lm78_exit(void) | 826 | static void __exit sm_lm78_exit(void) |
828 | { | 827 | { |
829 | i2c_isa_del_driver(&lm78_isa_driver); | 828 | if (isa_address) |
829 | i2c_isa_del_driver(&lm78_isa_driver); | ||
830 | i2c_del_driver(&lm78_driver); | 830 | i2c_del_driver(&lm78_driver); |
831 | } | 831 | } |
832 | 832 | ||
diff --git a/drivers/hwmon/smsc47m1.c b/drivers/hwmon/smsc47m1.c index 47132fd26b1b..beb881c4b2e8 100644 --- a/drivers/hwmon/smsc47m1.c +++ b/drivers/hwmon/smsc47m1.c | |||
@@ -2,8 +2,8 @@ | |||
2 | smsc47m1.c - Part of lm_sensors, Linux kernel modules | 2 | smsc47m1.c - Part of lm_sensors, Linux kernel modules |
3 | for hardware monitoring | 3 | for hardware monitoring |
4 | 4 | ||
5 | Supports the SMSC LPC47B27x, LPC47M10x, LPC47M13x, LPC47M14x, | 5 | Supports the SMSC LPC47B27x, LPC47M10x, LPC47M112, LPC47M13x, |
6 | LPC47M15x, LPC47M192 and LPC47M997 Super-I/O chips. | 6 | LPC47M14x, LPC47M15x, LPC47M192 and LPC47M997 Super-I/O chips. |
7 | 7 | ||
8 | Copyright (C) 2002 Mark D. Studebaker <mdsxyz123@yahoo.com> | 8 | Copyright (C) 2002 Mark D. Studebaker <mdsxyz123@yahoo.com> |
9 | Copyright (C) 2004 Jean Delvare <khali@linux-fr.org> | 9 | Copyright (C) 2004 Jean Delvare <khali@linux-fr.org> |
@@ -380,8 +380,8 @@ static int __init smsc47m1_find(unsigned short *addr) | |||
380 | val = superio_inb(SUPERIO_REG_DEVID); | 380 | val = superio_inb(SUPERIO_REG_DEVID); |
381 | 381 | ||
382 | /* | 382 | /* |
383 | * SMSC LPC47M10x/LPC47M13x (device id 0x59), LPC47M14x (device id | 383 | * SMSC LPC47M10x/LPC47M112/LPC47M13x (device id 0x59), LPC47M14x |
384 | * 0x5F) and LPC47B27x (device id 0x51) have fan control. | 384 | * (device id 0x5F) and LPC47B27x (device id 0x51) have fan control. |
385 | * The LPC47M15x and LPC47M192 chips "with hardware monitoring block" | 385 | * The LPC47M15x and LPC47M192 chips "with hardware monitoring block" |
386 | * can do much more besides (device id 0x60). | 386 | * can do much more besides (device id 0x60). |
387 | * The LPC47M997 is undocumented, but seems to be compatible with | 387 | * The LPC47M997 is undocumented, but seems to be compatible with |
@@ -390,7 +390,8 @@ static int __init smsc47m1_find(unsigned short *addr) | |||
390 | if (val == 0x51) | 390 | if (val == 0x51) |
391 | printk(KERN_INFO "smsc47m1: Found SMSC LPC47B27x\n"); | 391 | printk(KERN_INFO "smsc47m1: Found SMSC LPC47B27x\n"); |
392 | else if (val == 0x59) | 392 | else if (val == 0x59) |
393 | printk(KERN_INFO "smsc47m1: Found SMSC LPC47M10x/LPC47M13x\n"); | 393 | printk(KERN_INFO "smsc47m1: Found SMSC " |
394 | "LPC47M10x/LPC47M112/LPC47M13x\n"); | ||
394 | else if (val == 0x5F) | 395 | else if (val == 0x5F) |
395 | printk(KERN_INFO "smsc47m1: Found SMSC LPC47M14x\n"); | 396 | printk(KERN_INFO "smsc47m1: Found SMSC LPC47M14x\n"); |
396 | else if (val == 0x60) | 397 | else if (val == 0x60) |
diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c index 833faa275ffa..2257806d0102 100644 --- a/drivers/hwmon/w83627ehf.c +++ b/drivers/hwmon/w83627ehf.c | |||
@@ -354,6 +354,8 @@ static void w83627ehf_write_fan_div(struct i2c_client *client, int nr) | |||
354 | case 0: | 354 | case 0: |
355 | reg = (w83627ehf_read_value(client, W83627EHF_REG_FANDIV1) & 0xcf) | 355 | reg = (w83627ehf_read_value(client, W83627EHF_REG_FANDIV1) & 0xcf) |
356 | | ((data->fan_div[0] & 0x03) << 4); | 356 | | ((data->fan_div[0] & 0x03) << 4); |
357 | /* fan5 input control bit is write only, compute the value */ | ||
358 | reg |= (data->has_fan & (1 << 4)) ? 1 : 0; | ||
357 | w83627ehf_write_value(client, W83627EHF_REG_FANDIV1, reg); | 359 | w83627ehf_write_value(client, W83627EHF_REG_FANDIV1, reg); |
358 | reg = (w83627ehf_read_value(client, W83627EHF_REG_VBAT) & 0xdf) | 360 | reg = (w83627ehf_read_value(client, W83627EHF_REG_VBAT) & 0xdf) |
359 | | ((data->fan_div[0] & 0x04) << 3); | 361 | | ((data->fan_div[0] & 0x04) << 3); |
@@ -362,6 +364,8 @@ static void w83627ehf_write_fan_div(struct i2c_client *client, int nr) | |||
362 | case 1: | 364 | case 1: |
363 | reg = (w83627ehf_read_value(client, W83627EHF_REG_FANDIV1) & 0x3f) | 365 | reg = (w83627ehf_read_value(client, W83627EHF_REG_FANDIV1) & 0x3f) |
364 | | ((data->fan_div[1] & 0x03) << 6); | 366 | | ((data->fan_div[1] & 0x03) << 6); |
367 | /* fan5 input control bit is write only, compute the value */ | ||
368 | reg |= (data->has_fan & (1 << 4)) ? 1 : 0; | ||
365 | w83627ehf_write_value(client, W83627EHF_REG_FANDIV1, reg); | 369 | w83627ehf_write_value(client, W83627EHF_REG_FANDIV1, reg); |
366 | reg = (w83627ehf_read_value(client, W83627EHF_REG_VBAT) & 0xbf) | 370 | reg = (w83627ehf_read_value(client, W83627EHF_REG_VBAT) & 0xbf) |
367 | | ((data->fan_div[1] & 0x04) << 4); | 371 | | ((data->fan_div[1] & 0x04) << 4); |
@@ -1216,13 +1220,16 @@ static int w83627ehf_detect(struct i2c_adapter *adapter) | |||
1216 | superio_exit(); | 1220 | superio_exit(); |
1217 | 1221 | ||
1218 | /* It looks like fan4 and fan5 pins can be alternatively used | 1222 | /* It looks like fan4 and fan5 pins can be alternatively used |
1219 | as fan on/off switches */ | 1223 | as fan on/off switches, but fan5 control is write only :/ |
1224 | We assume that if the serial interface is disabled, designers | ||
1225 | connected fan5 as input unless they are emitting log 1, which | ||
1226 | is not the default. */ | ||
1220 | 1227 | ||
1221 | data->has_fan = 0x07; /* fan1, fan2 and fan3 */ | 1228 | data->has_fan = 0x07; /* fan1, fan2 and fan3 */ |
1222 | i = w83627ehf_read_value(client, W83627EHF_REG_FANDIV1); | 1229 | i = w83627ehf_read_value(client, W83627EHF_REG_FANDIV1); |
1223 | if ((i & (1 << 2)) && (!fan4pin)) | 1230 | if ((i & (1 << 2)) && (!fan4pin)) |
1224 | data->has_fan |= (1 << 3); | 1231 | data->has_fan |= (1 << 3); |
1225 | if ((i & (1 << 0)) && (!fan5pin)) | 1232 | if (!(i & (1 << 1)) && (!fan5pin)) |
1226 | data->has_fan |= (1 << 4); | 1233 | data->has_fan |= (1 << 4); |
1227 | 1234 | ||
1228 | /* Register sysfs hooks */ | 1235 | /* Register sysfs hooks */ |
diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c index a4584ec69842..1232171c3aad 100644 --- a/drivers/hwmon/w83781d.c +++ b/drivers/hwmon/w83781d.c | |||
@@ -1099,7 +1099,8 @@ w83781d_detect(struct i2c_adapter *adapter, int address, int kind) | |||
1099 | bank. */ | 1099 | bank. */ |
1100 | if (kind < 0) { | 1100 | if (kind < 0) { |
1101 | if (w83781d_read_value(client, W83781D_REG_CONFIG) & 0x80) { | 1101 | if (w83781d_read_value(client, W83781D_REG_CONFIG) & 0x80) { |
1102 | dev_dbg(dev, "Detection failed at step 3\n"); | 1102 | dev_dbg(&adapter->dev, "Detection of w83781d chip " |
1103 | "failed at step 3\n"); | ||
1103 | err = -ENODEV; | 1104 | err = -ENODEV; |
1104 | goto ERROR2; | 1105 | goto ERROR2; |
1105 | } | 1106 | } |
@@ -1109,7 +1110,8 @@ w83781d_detect(struct i2c_adapter *adapter, int address, int kind) | |||
1109 | if ((!(val1 & 0x07)) && | 1110 | if ((!(val1 & 0x07)) && |
1110 | (((!(val1 & 0x80)) && (val2 != 0xa3) && (val2 != 0xc3)) | 1111 | (((!(val1 & 0x80)) && (val2 != 0xa3) && (val2 != 0xc3)) |
1111 | || ((val1 & 0x80) && (val2 != 0x5c) && (val2 != 0x12)))) { | 1112 | || ((val1 & 0x80) && (val2 != 0x5c) && (val2 != 0x12)))) { |
1112 | dev_dbg(dev, "Detection failed at step 4\n"); | 1113 | dev_dbg(&adapter->dev, "Detection of w83781d chip " |
1114 | "failed at step 4\n"); | ||
1113 | err = -ENODEV; | 1115 | err = -ENODEV; |
1114 | goto ERROR2; | 1116 | goto ERROR2; |
1115 | } | 1117 | } |
@@ -1119,7 +1121,8 @@ w83781d_detect(struct i2c_adapter *adapter, int address, int kind) | |||
1119 | ((val1 & 0x80) && (val2 == 0x5c)))) { | 1121 | ((val1 & 0x80) && (val2 == 0x5c)))) { |
1120 | if (w83781d_read_value | 1122 | if (w83781d_read_value |
1121 | (client, W83781D_REG_I2C_ADDR) != address) { | 1123 | (client, W83781D_REG_I2C_ADDR) != address) { |
1122 | dev_dbg(dev, "Detection failed at step 5\n"); | 1124 | dev_dbg(&adapter->dev, "Detection of w83781d " |
1125 | "chip failed at step 5\n"); | ||
1123 | err = -ENODEV; | 1126 | err = -ENODEV; |
1124 | goto ERROR2; | 1127 | goto ERROR2; |
1125 | } | 1128 | } |
@@ -1141,8 +1144,8 @@ w83781d_detect(struct i2c_adapter *adapter, int address, int kind) | |||
1141 | else if (val2 == 0x12) | 1144 | else if (val2 == 0x12) |
1142 | vendid = asus; | 1145 | vendid = asus; |
1143 | else { | 1146 | else { |
1144 | dev_dbg(dev, "Chip was made by neither " | 1147 | dev_dbg(&adapter->dev, "w83781d chip vendor is " |
1145 | "Winbond nor Asus?\n"); | 1148 | "neither Winbond nor Asus\n"); |
1146 | err = -ENODEV; | 1149 | err = -ENODEV; |
1147 | goto ERROR2; | 1150 | goto ERROR2; |
1148 | } | 1151 | } |
@@ -1161,10 +1164,9 @@ w83781d_detect(struct i2c_adapter *adapter, int address, int kind) | |||
1161 | kind = as99127f; | 1164 | kind = as99127f; |
1162 | else { | 1165 | else { |
1163 | if (kind == 0) | 1166 | if (kind == 0) |
1164 | dev_warn(dev, "Ignoring 'force' " | 1167 | dev_warn(&adapter->dev, "Ignoring 'force' " |
1165 | "parameter for unknown chip at " | 1168 | "parameter for unknown chip at " |
1166 | "adapter %d, address 0x%02x\n", | 1169 | "address 0x%02x\n", address); |
1167 | i2c_adapter_id(adapter), address); | ||
1168 | err = -EINVAL; | 1170 | err = -EINVAL; |
1169 | goto ERROR2; | 1171 | goto ERROR2; |
1170 | } | 1172 | } |
@@ -1685,11 +1687,10 @@ sensors_w83781d_init(void) | |||
1685 | if (res) | 1687 | if (res) |
1686 | return res; | 1688 | return res; |
1687 | 1689 | ||
1688 | res = i2c_isa_add_driver(&w83781d_isa_driver); | 1690 | /* Don't exit if this one fails, we still want the I2C variants |
1689 | if (res) { | 1691 | to work! */ |
1690 | i2c_del_driver(&w83781d_driver); | 1692 | if (i2c_isa_add_driver(&w83781d_isa_driver)) |
1691 | return res; | 1693 | isa_address = 0; |
1692 | } | ||
1693 | 1694 | ||
1694 | return 0; | 1695 | return 0; |
1695 | } | 1696 | } |
@@ -1697,7 +1698,8 @@ sensors_w83781d_init(void) | |||
1697 | static void __exit | 1698 | static void __exit |
1698 | sensors_w83781d_exit(void) | 1699 | sensors_w83781d_exit(void) |
1699 | { | 1700 | { |
1700 | i2c_isa_del_driver(&w83781d_isa_driver); | 1701 | if (isa_address) |
1702 | i2c_isa_del_driver(&w83781d_isa_driver); | ||
1701 | i2c_del_driver(&w83781d_driver); | 1703 | i2c_del_driver(&w83781d_driver); |
1702 | } | 1704 | } |
1703 | 1705 | ||
diff --git a/drivers/hwmon/w83791d.c b/drivers/hwmon/w83791d.c index 371ed4f69a97..9e5f885368b4 100644 --- a/drivers/hwmon/w83791d.c +++ b/drivers/hwmon/w83791d.c | |||
@@ -746,6 +746,52 @@ static ssize_t store_vrm_reg(struct device *dev, | |||
746 | 746 | ||
747 | static DEVICE_ATTR(vrm, S_IRUGO | S_IWUSR, show_vrm_reg, store_vrm_reg); | 747 | static DEVICE_ATTR(vrm, S_IRUGO | S_IWUSR, show_vrm_reg, store_vrm_reg); |
748 | 748 | ||
749 | #define IN_UNIT_ATTRS(X) \ | ||
750 | &sda_in_input[X].dev_attr.attr, \ | ||
751 | &sda_in_min[X].dev_attr.attr, \ | ||
752 | &sda_in_max[X].dev_attr.attr | ||
753 | |||
754 | #define FAN_UNIT_ATTRS(X) \ | ||
755 | &sda_fan_input[X].dev_attr.attr, \ | ||
756 | &sda_fan_min[X].dev_attr.attr, \ | ||
757 | &sda_fan_div[X].dev_attr.attr | ||
758 | |||
759 | #define TEMP_UNIT_ATTRS(X) \ | ||
760 | &sda_temp_input[X].dev_attr.attr, \ | ||
761 | &sda_temp_max[X].dev_attr.attr, \ | ||
762 | &sda_temp_max_hyst[X].dev_attr.attr | ||
763 | |||
764 | static struct attribute *w83791d_attributes[] = { | ||
765 | IN_UNIT_ATTRS(0), | ||
766 | IN_UNIT_ATTRS(1), | ||
767 | IN_UNIT_ATTRS(2), | ||
768 | IN_UNIT_ATTRS(3), | ||
769 | IN_UNIT_ATTRS(4), | ||
770 | IN_UNIT_ATTRS(5), | ||
771 | IN_UNIT_ATTRS(6), | ||
772 | IN_UNIT_ATTRS(7), | ||
773 | IN_UNIT_ATTRS(8), | ||
774 | IN_UNIT_ATTRS(9), | ||
775 | FAN_UNIT_ATTRS(0), | ||
776 | FAN_UNIT_ATTRS(1), | ||
777 | FAN_UNIT_ATTRS(2), | ||
778 | FAN_UNIT_ATTRS(3), | ||
779 | FAN_UNIT_ATTRS(4), | ||
780 | TEMP_UNIT_ATTRS(0), | ||
781 | TEMP_UNIT_ATTRS(1), | ||
782 | TEMP_UNIT_ATTRS(2), | ||
783 | &dev_attr_alarms.attr, | ||
784 | &sda_beep_ctrl[0].dev_attr.attr, | ||
785 | &sda_beep_ctrl[1].dev_attr.attr, | ||
786 | &dev_attr_cpu0_vid.attr, | ||
787 | &dev_attr_vrm.attr, | ||
788 | NULL | ||
789 | }; | ||
790 | |||
791 | static const struct attribute_group w83791d_group = { | ||
792 | .attrs = w83791d_attributes, | ||
793 | }; | ||
794 | |||
749 | /* This function is called when: | 795 | /* This function is called when: |
750 | * w83791d_driver is inserted (when this module is loaded), for each | 796 | * w83791d_driver is inserted (when this module is loaded), for each |
751 | available adapter | 797 | available adapter |
@@ -967,41 +1013,20 @@ static int w83791d_detect(struct i2c_adapter *adapter, int address, int kind) | |||
967 | } | 1013 | } |
968 | 1014 | ||
969 | /* Register sysfs hooks */ | 1015 | /* Register sysfs hooks */ |
1016 | if ((err = sysfs_create_group(&client->dev.kobj, &w83791d_group))) | ||
1017 | goto error3; | ||
1018 | |||
1019 | /* Everything is ready, now register the working device */ | ||
970 | data->class_dev = hwmon_device_register(dev); | 1020 | data->class_dev = hwmon_device_register(dev); |
971 | if (IS_ERR(data->class_dev)) { | 1021 | if (IS_ERR(data->class_dev)) { |
972 | err = PTR_ERR(data->class_dev); | 1022 | err = PTR_ERR(data->class_dev); |
973 | goto error3; | 1023 | goto error4; |
974 | } | 1024 | } |
975 | 1025 | ||
976 | for (i = 0; i < NUMBER_OF_VIN; i++) { | ||
977 | device_create_file(dev, &sda_in_input[i].dev_attr); | ||
978 | device_create_file(dev, &sda_in_min[i].dev_attr); | ||
979 | device_create_file(dev, &sda_in_max[i].dev_attr); | ||
980 | } | ||
981 | |||
982 | for (i = 0; i < NUMBER_OF_FANIN; i++) { | ||
983 | device_create_file(dev, &sda_fan_input[i].dev_attr); | ||
984 | device_create_file(dev, &sda_fan_div[i].dev_attr); | ||
985 | device_create_file(dev, &sda_fan_min[i].dev_attr); | ||
986 | } | ||
987 | |||
988 | for (i = 0; i < NUMBER_OF_TEMPIN; i++) { | ||
989 | device_create_file(dev, &sda_temp_input[i].dev_attr); | ||
990 | device_create_file(dev, &sda_temp_max[i].dev_attr); | ||
991 | device_create_file(dev, &sda_temp_max_hyst[i].dev_attr); | ||
992 | } | ||
993 | |||
994 | device_create_file(dev, &dev_attr_alarms); | ||
995 | |||
996 | for (i = 0; i < ARRAY_SIZE(sda_beep_ctrl); i++) { | ||
997 | device_create_file(dev, &sda_beep_ctrl[i].dev_attr); | ||
998 | } | ||
999 | |||
1000 | device_create_file(dev, &dev_attr_cpu0_vid); | ||
1001 | device_create_file(dev, &dev_attr_vrm); | ||
1002 | |||
1003 | return 0; | 1026 | return 0; |
1004 | 1027 | ||
1028 | error4: | ||
1029 | sysfs_remove_group(&client->dev.kobj, &w83791d_group); | ||
1005 | error3: | 1030 | error3: |
1006 | if (data->lm75[0] != NULL) { | 1031 | if (data->lm75[0] != NULL) { |
1007 | i2c_detach_client(data->lm75[0]); | 1032 | i2c_detach_client(data->lm75[0]); |
@@ -1025,8 +1050,10 @@ static int w83791d_detach_client(struct i2c_client *client) | |||
1025 | int err; | 1050 | int err; |
1026 | 1051 | ||
1027 | /* main client */ | 1052 | /* main client */ |
1028 | if (data) | 1053 | if (data) { |
1029 | hwmon_device_unregister(data->class_dev); | 1054 | hwmon_device_unregister(data->class_dev); |
1055 | sysfs_remove_group(&client->dev.kobj, &w83791d_group); | ||
1056 | } | ||
1030 | 1057 | ||
1031 | if ((err = i2c_detach_client(client))) | 1058 | if ((err = i2c_detach_client(client))) |
1032 | return err; | 1059 | return err; |
diff --git a/drivers/i2c/busses/i2c-isa.c b/drivers/i2c/busses/i2c-isa.c index 4380653748a4..8ed59a2dff53 100644 --- a/drivers/i2c/busses/i2c-isa.c +++ b/drivers/i2c/busses/i2c-isa.c | |||
@@ -91,7 +91,7 @@ int i2c_isa_add_driver(struct i2c_driver *driver) | |||
91 | /* Now look for clients */ | 91 | /* Now look for clients */ |
92 | res = driver->attach_adapter(&isa_adapter); | 92 | res = driver->attach_adapter(&isa_adapter); |
93 | if (res) { | 93 | if (res) { |
94 | dev_err(&isa_adapter.dev, | 94 | dev_dbg(&isa_adapter.dev, |
95 | "Driver %s failed to attach adapter, unregistering\n", | 95 | "Driver %s failed to attach adapter, unregistering\n", |
96 | driver->driver.name); | 96 | driver->driver.name); |
97 | driver_unregister(&driver->driver); | 97 | driver_unregister(&driver->driver); |