From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
To: helgaas@kernel.org
Cc: linux-pci@vger.kernel.org, stuart.w.hayes@gmail.com,
dan.j.williams@intel.com
Subject: [PATCH 1/3] misc: enclosure: remove get_active() callback
Date: Thu, 17 Nov 2022 17:34:05 +0100 [thread overview]
Message-ID: <20221117163407.28472-2-mariusz.tkaczyk@linux.intel.com> (raw)
In-Reply-To: <20221117163407.28472-1-mariusz.tkaczyk@linux.intel.com>
The callback is not used, remove it.
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
---
drivers/misc/enclosure.c | 14 +-------------
include/linux/enclosure.h | 2 --
2 files changed, 1 insertion(+), 15 deletions(-)
diff --git a/drivers/misc/enclosure.c b/drivers/misc/enclosure.c
index 1b010d9267c9..fd0707a8ed79 100644
--- a/drivers/misc/enclosure.c
+++ b/drivers/misc/enclosure.c
@@ -531,17 +531,6 @@ static ssize_t set_component_status(struct device *cdev,
return -EINVAL;
}
-static ssize_t get_component_active(struct device *cdev,
- struct device_attribute *attr, char *buf)
-{
- struct enclosure_device *edev = to_enclosure_device(cdev->parent);
- struct enclosure_component *ecomp = to_enclosure_component(cdev);
-
- if (edev->cb->get_active)
- edev->cb->get_active(edev, ecomp);
- return sysfs_emit(buf, "%d\n", ecomp->active);
-}
-
static ssize_t set_component_active(struct device *cdev,
struct device_attribute *attr,
const char *buf, size_t count)
@@ -645,8 +634,7 @@ static DEVICE_ATTR(fault, S_IRUGO | S_IWUSR, get_component_fault,
set_component_fault);
static DEVICE_ATTR(status, S_IRUGO | S_IWUSR, get_component_status,
set_component_status);
-static DEVICE_ATTR(active, S_IRUGO | S_IWUSR, get_component_active,
- set_component_active);
+static DEVICE_ATTR(active, S_IWUSR, NULL, set_component_active);
static DEVICE_ATTR(locate, S_IRUGO | S_IWUSR, get_component_locate,
set_component_locate);
static DEVICE_ATTR(power_status, S_IRUGO | S_IWUSR, get_component_power_status,
diff --git a/include/linux/enclosure.h b/include/linux/enclosure.h
index 1c630e2c2756..8d09c6d07bf1 100644
--- a/include/linux/enclosure.h
+++ b/include/linux/enclosure.h
@@ -62,8 +62,6 @@ struct enclosure_component_callbacks {
int (*set_fault)(struct enclosure_device *,
struct enclosure_component *,
enum enclosure_component_setting);
- void (*get_active)(struct enclosure_device *,
- struct enclosure_component *);
int (*set_active)(struct enclosure_device *,
struct enclosure_component *,
enum enclosure_component_setting);
--
2.26.2
next prev parent reply other threads:[~2022-11-17 16:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-17 16:34 [PATCH 0/3] Enclosure sysfs refactor Mariusz Tkaczyk
2022-11-17 16:34 ` Mariusz Tkaczyk [this message]
2023-05-04 17:22 ` [PATCH 1/3] misc: enclosure: remove get_active() callback Dan Williams
2022-11-17 16:34 ` [PATCH 2/3] misc: enclosure, ses: simplify some get callbacks Mariusz Tkaczyk
2023-05-04 23:58 ` Dan Williams
2023-05-05 11:45 ` Mariusz Tkaczyk
2023-05-05 17:33 ` Dan Williams
2022-11-17 16:34 ` [PATCH 3/3] misc: enclosure: update sysfs api Mariusz Tkaczyk
2023-05-05 0:11 ` Dan Williams
2023-05-04 12:10 ` [PATCH 0/3] Enclosure sysfs refactor Mariusz Tkaczyk
2023-05-04 17:16 ` Dan Williams
2023-05-05 9:12 ` Mariusz Tkaczyk
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=20221117163407.28472-2-mariusz.tkaczyk@linux.intel.com \
--to=mariusz.tkaczyk@linux.intel.com \
--cc=dan.j.williams@intel.com \
--cc=helgaas@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=stuart.w.hayes@gmail.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).