[PATCH 47/49] rc-core: add keytable events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add separe rc device events on keytable addition/removal.

Signed-off-by: David Härdeman <david@xxxxxxxxxxx>
---
 drivers/media/rc/rc-main.c |    2 ++
 include/media/rc-core.h    |    2 ++
 2 files changed, 4 insertions(+)

diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index bd4dfab..b3db1dd 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -221,6 +221,7 @@ static int rc_add_keytable(struct rc_dev *dev, const char *name,
 	rcu_assign_pointer(dev->keytables[i], kt);
 	list_add_rcu(&kt->node, &dev->keytable_list);
 	synchronize_rcu();
+	rc_event(dev, RC_CORE, RC_CORE_KT_ADDED, i);
 	return 0;
 }
 
@@ -241,6 +242,7 @@ static int rc_remove_keytable(struct rc_dev *dev, unsigned i)
 		return -EINVAL;
 
 	rc_keytable_destroy(kt);
+	rc_event(dev, RC_CORE, RC_CORE_KT_REMOVED, i);
 	return 0;
 }
 
diff --git a/include/media/rc-core.h b/include/media/rc-core.h
index a310e5b..a7354b7 100644
--- a/include/media/rc-core.h
+++ b/include/media/rc-core.h
@@ -203,6 +203,8 @@ struct rc_keymap_entry {
 
 /* RC_CORE codes */
 #define RC_CORE_DROPPED		0x0
+#define RC_CORE_KT_ADDED	0x1
+#define RC_CORE_KT_REMOVED	0x2
 
 /* RC_KEY codes */
 #define RC_KEY_REPEAT		0x0

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux