From 773bcf8c9ce04c62c513182620efb729c97452fc Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 6 Apr 2014 10:48:31 -0300 Subject: [media] v4l2-common: fix warning when used on userpace As reported by Linus, make headers_check is reporting: usr/include/linux/v4l2-common.h:72: found __[us]{8,16,32,64} type without #include which seems to have come in through commits 777f4f85b75f1 and 254a47770163f. That happens because struct v4l2_edid should be visible by both subdev and V4L2 APIs. So, it was moved to v4l2-common.h. As Linus pointed, the proper fix is to just add an include for linux/types.h at v4l2-common.h. Reported-by: Linus Torvalds Signed-off-by: Mauro Carvalho Chehab --- include/uapi/linux/v4l2-common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/uapi/linux/v4l2-common.h b/include/uapi/linux/v4l2-common.h index 270db8914c01..9bf508ad0957 100644 --- a/include/uapi/linux/v4l2-common.h +++ b/include/uapi/linux/v4l2-common.h @@ -29,6 +29,8 @@ #ifndef __V4L2_COMMON__ #define __V4L2_COMMON__ +#include + /* * * Selection interface definitions -- cgit v1.2.2 From 23c843b5eb11198e7de3a2af0756d1f897117932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20H=C3=A4rdeman?= Date: Fri, 4 Apr 2014 19:06:01 -0300 Subject: [media] rc-core: split dev->s_filter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Overloading dev->s_filter to do two different functions (set wakeup filters and generic hardware filters) makes it impossible to tell what the hardware actually supports, so create a separate dev->s_wakeup_filter and make the distinction explicit. Signed-off-by: David Härdeman Acked-by: James Hogan Signed-off-by: Mauro Carvalho Chehab --- include/media/rc-core.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/media/rc-core.h b/include/media/rc-core.h index 0b9f890ce431..6dbc7c11224f 100644 --- a/include/media/rc-core.h +++ b/include/media/rc-core.h @@ -112,7 +112,8 @@ enum rc_filter_type { * device doesn't interrupt host until it sees IR pulses * @s_learning_mode: enable wide band receiver used for learning * @s_carrier_report: enable carrier reports - * @s_filter: set the scancode filter of a given type + * @s_filter: set the scancode filter + * @s_wakeup_filter: set the wakeup scancode filter */ struct rc_dev { struct device dev; @@ -159,8 +160,9 @@ struct rc_dev { int (*s_learning_mode)(struct rc_dev *dev, int enable); int (*s_carrier_report) (struct rc_dev *dev, int enable); int (*s_filter)(struct rc_dev *dev, - enum rc_filter_type type, struct rc_scancode_filter *filter); + int (*s_wakeup_filter)(struct rc_dev *dev, + struct rc_scancode_filter *filter); }; #define to_rc_dev(d) container_of(d, struct rc_dev, dev) -- cgit v1.2.2 From 99b0f3c96cebf3af9a645d9b00db14cb04fcdfa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20H=C3=A4rdeman?= Date: Fri, 4 Apr 2014 19:06:06 -0300 Subject: [media] rc-core: remove generic scancode filter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The generic scancode filtering has questionable value and makes it impossible to determine from userspace if there is an actual scancode hw filter present or not. So revert the generic parts. Based on a patch from James Hogan , but this version also makes sure that only the valid sysfs files are created in the first place. Signed-off-by: David Härdeman Acked-by: James Hogan Signed-off-by: Mauro Carvalho Chehab --- include/media/rc-core.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/media/rc-core.h b/include/media/rc-core.h index 6dbc7c11224f..fde142e5f25a 100644 --- a/include/media/rc-core.h +++ b/include/media/rc-core.h @@ -60,6 +60,7 @@ enum rc_filter_type { /** * struct rc_dev - represents a remote control device * @dev: driver model's view of this device + * @sysfs_groups: sysfs attribute groups * @input_name: name of the input child device * @input_phys: physical path to the input child device * @input_id: id of the input child device (struct input_id) @@ -117,6 +118,7 @@ enum rc_filter_type { */ struct rc_dev { struct device dev; + const struct attribute_group *sysfs_groups[5]; const char *input_name; const char *input_phys; struct input_id input_id; -- cgit v1.2.2