public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: linux@treblig.org
To: cw00.choi@samsung.com, myungjoo.ham@samsung.com,
	kyungmin.park@samsung.com, linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	"Dr. David Alan Gilbert" <linux@treblig.org>
Subject: [PATCH] PM / devfreq: Remove unused devfreq_event_reset_event
Date: Tue, 22 Oct 2024 01:31:57 +0100	[thread overview]
Message-ID: <20241022003157.303127-1-linux@treblig.org> (raw)

From: "Dr. David Alan Gilbert" <linux@treblig.org>

devfreq_event_reset_event() was added in 2015 by
commit f262f28c1470 ("PM / devfreq: event: Add devfreq_event class")

but has remained unused.

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
 drivers/devfreq/devfreq-event.c | 26 --------------------------
 include/linux/devfreq-event.h   |  6 ------
 2 files changed, 32 deletions(-)

diff --git a/drivers/devfreq/devfreq-event.c b/drivers/devfreq/devfreq-event.c
index 3ebac2496679..a60703374006 100644
--- a/drivers/devfreq/devfreq-event.c
+++ b/drivers/devfreq/devfreq-event.c
@@ -183,32 +183,6 @@ int devfreq_event_get_event(struct devfreq_event_dev *edev,
 }
 EXPORT_SYMBOL_GPL(devfreq_event_get_event);
 
-/**
- * devfreq_event_reset_event() - Reset all opeations of devfreq-event dev.
- * @edev	: the devfreq-event device
- *
- * Note that this function stop all operations of devfreq-event dev and reset
- * the current event data to make the devfreq-event device into initial state.
- */
-int devfreq_event_reset_event(struct devfreq_event_dev *edev)
-{
-	int ret = 0;
-
-	if (!edev || !edev->desc)
-		return -EINVAL;
-
-	if (!devfreq_event_is_enabled(edev))
-		return -EPERM;
-
-	mutex_lock(&edev->lock);
-	if (edev->desc->ops && edev->desc->ops->reset)
-		ret = edev->desc->ops->reset(edev);
-	mutex_unlock(&edev->lock);
-
-	return ret;
-}
-EXPORT_SYMBOL_GPL(devfreq_event_reset_event);
-
 /**
  * devfreq_event_get_edev_by_phandle() - Get the devfreq-event dev from
  *					 devicetree.
diff --git a/include/linux/devfreq-event.h b/include/linux/devfreq-event.h
index 4a50a5c71a5f..461080280de9 100644
--- a/include/linux/devfreq-event.h
+++ b/include/linux/devfreq-event.h
@@ -104,7 +104,6 @@ extern bool devfreq_event_is_enabled(struct devfreq_event_dev *edev);
 extern int devfreq_event_set_event(struct devfreq_event_dev *edev);
 extern int devfreq_event_get_event(struct devfreq_event_dev *edev,
 				struct devfreq_event_data *edata);
-extern int devfreq_event_reset_event(struct devfreq_event_dev *edev);
 extern struct devfreq_event_dev *devfreq_event_get_edev_by_phandle(
 				struct device *dev,
 				const char *phandle_name,
@@ -149,11 +148,6 @@ static inline int devfreq_event_get_event(struct devfreq_event_dev *edev,
 	return -EINVAL;
 }
 
-static inline int devfreq_event_reset_event(struct devfreq_event_dev *edev)
-{
-	return -EINVAL;
-}
-
 static inline struct devfreq_event_dev *devfreq_event_get_edev_by_phandle(
 					struct device *dev,
 					const char *phandle_name,
-- 
2.47.0


             reply	other threads:[~2024-10-22  0:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-22  0:31 linux [this message]
2024-11-22  2:03 ` [PATCH] PM / devfreq: Remove unused devfreq_event_reset_event Dr. David Alan Gilbert
     [not found] <CGME20241127063114epcms1p5aac02aa2dee6506cd7c70511c42568f0@epcms1p5>
2024-11-27  6:31 ` MyungJoo Ham

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=20241022003157.303127-1-linux@treblig.org \
    --to=linux@treblig.org \
    --cc=cw00.choi@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=myungjoo.ham@samsung.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