From 48e991476d73da73d8ef145074eb1ffd4cad6c16 Mon Sep 17 00:00:00 2001
From: Eric Curtin <ecurtin@redhat.com>
Date: Fri, 20 May 2022 20:01:03 +0100
Subject: cam: event_loop: Rename addEvent to addFdEvent

With the addition of addTimerEvent, the naming of addEvent is specific
to the management of an fd, while the naming is generic.

Update the name to make the naming scheme consistent in specifying the
type of event to be added.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Tested-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/cam/drm.cpp        | 4 ++--
 src/cam/event_loop.cpp | 4 ++--
 src/cam/event_loop.h   | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

(limited to 'src')

diff --git a/src/cam/drm.cpp b/src/cam/drm.cpp
index 46e34eb5..42c5a3b1 100644
--- a/src/cam/drm.cpp
+++ b/src/cam/drm.cpp
@@ -432,8 +432,8 @@ int Device::init()
 	if (ret < 0)
 		return ret;
 
-	EventLoop::instance()->addEvent(fd_, EventLoop::Read,
-					std::bind(&Device::drmEvent, this));
+	EventLoop::instance()->addFdEvent(fd_, EventLoop::Read,
+					  std::bind(&Device::drmEvent, this));
 
 	return 0;
 }
diff --git a/src/cam/event_loop.cpp b/src/cam/event_loop.cpp
index e25784c0..2e3ce995 100644
--- a/src/cam/event_loop.cpp
+++ b/src/cam/event_loop.cpp
@@ -60,8 +60,8 @@ void EventLoop::callLater(const std::function<void()> &func)
 	event_base_once(base_, -1, EV_TIMEOUT, dispatchCallback, this, nullptr);
 }
 
-void EventLoop::addEvent(int fd, EventType type,
-			 const std::function<void()> &callback)
+void EventLoop::addFdEvent(int fd, EventType type,
+			   const std::function<void()> &callback)
 {
 	std::unique_ptr<Event> event = std::make_unique<Event>(callback);
 	short events = (type & Read ? EV_READ : 0)
diff --git a/src/cam/event_loop.h b/src/cam/event_loop.h
index a4613eb2..79902d87 100644
--- a/src/cam/event_loop.h
+++ b/src/cam/event_loop.h
@@ -34,8 +34,8 @@ public:
 
 	void callLater(const std::function<void()> &func);
 
-	void addEvent(int fd, EventType type,
-		      const std::function<void()> &handler);
+	void addFdEvent(int fd, EventType type,
+			const std::function<void()> &handler);
 
 private:
 	struct Event {
-- 
cgit v1.2.1