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 6c8bc3a..b16dbf4 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c @@ -513,6 +513,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; } @@ -530,6 +531,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 ea3dcf4..056275a 100644 --- a/include/media/rc-core.h +++ b/include/media/rc-core.h @@ -221,6 +221,8 @@ struct rc_event { /* 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