LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Bastian Germann <bastiangermann@fishpost.de>
To: Luca Tettamanti <kronos.it@gmail.com>
Cc: Bastian Germann <bastiangermann@fishpost.de>,
	Jean Delvare <jdelvare@suse.com>,
	Guenter Roeck <linux@roeck-us.net>,
	linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] hwmon: (asus_atk0110) Remove unused manual sysfs file management
Date: Thu, 31 May 2018 16:01:36 +0200	[thread overview]
Message-ID: <20180531140136.13969-2-bastiangermann@fishpost.de> (raw)
In-Reply-To: <20180531140136.13969-1-bastiangermann@fishpost.de>

Remove the manual sysfs file creation and deletion that are now taken care
of by the (un)register calls via an attribute_group array.

Signed-off-by: Bastian Germann <bastiangermann@fishpost.de>
---
 drivers/hwmon/asus_atk0110.c | 46 ------------------------------------
 1 file changed, 46 deletions(-)

diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c
index 8a35fb27ff50..2f4955ec8437 100644
--- a/drivers/hwmon/asus_atk0110.c
+++ b/drivers/hwmon/asus_atk0110.c
@@ -263,14 +263,6 @@ static ssize_t atk_limit2_show(struct device *dev,
 	return sprintf(buf, "%lld\n", value);
 }
 
-static ssize_t atk_name_show(struct device *dev,
-				struct device_attribute *attr, char *buf)
-{
-	return sprintf(buf, "atk0110\n");
-}
-static struct device_attribute atk_name_attr =
-		__ATTR(name, 0444, atk_name_show, NULL);
-
 static void atk_init_attribute(struct device_attribute *attr, char *name,
 		sysfs_show_func show)
 {
@@ -1194,44 +1186,6 @@ static int atk_enumerate_new_hwmon(struct atk_data *data)
 	return err;
 }
 
-static int atk_create_files(struct atk_data *data)
-{
-	struct atk_sensor_data *s;
-	int err;
-
-	list_for_each_entry(s, &data->sensor_list, list) {
-		err = device_create_file(data->hwmon_dev, &s->input_attr);
-		if (err)
-			return err;
-		err = device_create_file(data->hwmon_dev, &s->label_attr);
-		if (err)
-			return err;
-		err = device_create_file(data->hwmon_dev, &s->limit1_attr);
-		if (err)
-			return err;
-		err = device_create_file(data->hwmon_dev, &s->limit2_attr);
-		if (err)
-			return err;
-	}
-
-	err = device_create_file(data->hwmon_dev, &atk_name_attr);
-
-	return err;
-}
-
-static void atk_remove_files(struct atk_data *data)
-{
-	struct atk_sensor_data *s;
-
-	list_for_each_entry(s, &data->sensor_list, list) {
-		device_remove_file(data->hwmon_dev, &s->input_attr);
-		device_remove_file(data->hwmon_dev, &s->label_attr);
-		device_remove_file(data->hwmon_dev, &s->limit1_attr);
-		device_remove_file(data->hwmon_dev, &s->limit2_attr);
-	}
-	device_remove_file(data->hwmon_dev, &atk_name_attr);
-}
-
 static void atk_free_sensors(struct atk_data *data)
 {
 	struct list_head *head = &data->sensor_list;
-- 
2.17.1

  reply	other threads:[~2018-05-31 14:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-31 14:01 [PATCH 1/2] hwmon: (asus_atk0110) Replace deprecated device register call Bastian Germann
2018-05-31 14:01 ` Bastian Germann [this message]
2018-05-31 14:28   ` [PATCH 2/2] hwmon: (asus_atk0110) Remove unused manual sysfs file management Guenter Roeck
2018-05-31 14:27 ` [PATCH 1/2] hwmon: (asus_atk0110) Replace deprecated device register call Guenter Roeck
2018-05-31 22:56   ` Bastian Germann
2018-05-31 22:57     ` [PATCH 2/2] hwmon: (asus_atk0110) Make use of device managed memory Bastian Germann
2018-06-01  9:54       ` Andy Shevchenko
2018-06-01 11:07         ` [PATCH 1/2] hwmon: (asus_atk0110) Replace deprecated device register call Bastian Germann
2018-06-01 11:07           ` [PATCH 2/2] hwmon: (asus_atk0110) Make use of device managed memory Bastian Germann
2018-06-01 13:28           ` [PATCH 1/2] hwmon: (asus_atk0110) Replace deprecated device register call Guenter Roeck
2018-06-01 15:14             ` asus_atk0110: Use non-deprecated registration and managed memory Bastian Germann
2018-06-01 15:14               ` [PATCH v4 1/2] hwmon: (asus_atk0110) Replace deprecated device register call Bastian Germann
2018-06-01 16:35                 ` Guenter Roeck
2018-06-04 20:35                 ` Luca Tettamanti
2018-06-01 15:14               ` [PATCH v4 2/2] hwmon: (asus_atk0110) Make use of device managed memory Bastian Germann
2018-06-01 16:40                 ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180531140136.13969-2-bastiangermann@fishpost.de \
    --to=bastiangermann@fishpost.de \
    --cc=jdelvare@suse.com \
    --cc=kronos.it@gmail.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --subject='Re: [PATCH 2/2] hwmon: (asus_atk0110) Remove unused manual sysfs file management' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).