diff options
-rw-r--r-- | drivers/hwmon/lm63.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/hwmon/lm63.c b/drivers/hwmon/lm63.c index b4ad598feb6c..7ff4fc7c6dbd 100644 --- a/drivers/hwmon/lm63.c +++ b/drivers/hwmon/lm63.c | |||
@@ -915,6 +915,15 @@ static struct attribute *lm63_attributes[] = { | |||
915 | NULL | 915 | NULL |
916 | }; | 916 | }; |
917 | 917 | ||
918 | static struct attribute *lm63_attributes_temp2_type[] = { | ||
919 | &dev_attr_temp2_type.attr, | ||
920 | NULL | ||
921 | }; | ||
922 | |||
923 | static const struct attribute_group lm63_group_temp2_type = { | ||
924 | .attrs = lm63_attributes_temp2_type, | ||
925 | }; | ||
926 | |||
918 | static struct attribute *lm63_attributes_extra_lut[] = { | 927 | static struct attribute *lm63_attributes_extra_lut[] = { |
919 | &sensor_dev_attr_pwm1_auto_point9_pwm.dev_attr.attr, | 928 | &sensor_dev_attr_pwm1_auto_point9_pwm.dev_attr.attr, |
920 | &sensor_dev_attr_pwm1_auto_point9_temp.dev_attr.attr, | 929 | &sensor_dev_attr_pwm1_auto_point9_temp.dev_attr.attr, |
@@ -1133,7 +1142,8 @@ static int lm63_probe(struct i2c_client *client, | |||
1133 | goto exit_remove_files; | 1142 | goto exit_remove_files; |
1134 | } | 1143 | } |
1135 | if (data->kind == lm96163) { | 1144 | if (data->kind == lm96163) { |
1136 | err = device_create_file(&client->dev, &dev_attr_temp2_type); | 1145 | err = sysfs_create_group(&client->dev.kobj, |
1146 | &lm63_group_temp2_type); | ||
1137 | if (err) | 1147 | if (err) |
1138 | goto exit_remove_files; | 1148 | goto exit_remove_files; |
1139 | 1149 | ||
@@ -1155,7 +1165,7 @@ exit_remove_files: | |||
1155 | sysfs_remove_group(&client->dev.kobj, &lm63_group); | 1165 | sysfs_remove_group(&client->dev.kobj, &lm63_group); |
1156 | sysfs_remove_group(&client->dev.kobj, &lm63_group_fan1); | 1166 | sysfs_remove_group(&client->dev.kobj, &lm63_group_fan1); |
1157 | if (data->kind == lm96163) { | 1167 | if (data->kind == lm96163) { |
1158 | device_remove_file(&client->dev, &dev_attr_temp2_type); | 1168 | sysfs_remove_group(&client->dev.kobj, &lm63_group_temp2_type); |
1159 | sysfs_remove_group(&client->dev.kobj, &lm63_group_extra_lut); | 1169 | sysfs_remove_group(&client->dev.kobj, &lm63_group_extra_lut); |
1160 | } | 1170 | } |
1161 | return err; | 1171 | return err; |
@@ -1169,7 +1179,7 @@ static int lm63_remove(struct i2c_client *client) | |||
1169 | sysfs_remove_group(&client->dev.kobj, &lm63_group); | 1179 | sysfs_remove_group(&client->dev.kobj, &lm63_group); |
1170 | sysfs_remove_group(&client->dev.kobj, &lm63_group_fan1); | 1180 | sysfs_remove_group(&client->dev.kobj, &lm63_group_fan1); |
1171 | if (data->kind == lm96163) { | 1181 | if (data->kind == lm96163) { |
1172 | device_remove_file(&client->dev, &dev_attr_temp2_type); | 1182 | sysfs_remove_group(&client->dev.kobj, &lm63_group_temp2_type); |
1173 | sysfs_remove_group(&client->dev.kobj, &lm63_group_extra_lut); | 1183 | sysfs_remove_group(&client->dev.kobj, &lm63_group_extra_lut); |
1174 | } | 1184 | } |
1175 | 1185 | ||