From fda56953d09325bd00e7edc0292d5034e494218e Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Mon, 19 Feb 2007 16:50:52 -0800 Subject: compat: Add -include linux/version.h to cflags From: Trent Piepho Add -include linux/version.h to the cflags. Now code can have backward compatibility test without including compat.h first. Linux headers included from compat.h are removed, so that code will get the same headers when compiling in v4l-dvb as it does in the kernel. Many drivers have compat.h moved to the end of their include list, as this lets compat.h do things it can't do at the beginning. Such as test of something is defined to include compat code, or to put a wrapper around a function without changing the function's name. Signed-off-by: Trent Piepho --- linux/drivers/media/video/upd64083.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers/media/video/upd64083.c') diff --git a/linux/drivers/media/video/upd64083.c b/linux/drivers/media/video/upd64083.c index 61be85abd..1fdde6e06 100644 --- a/linux/drivers/media/video/upd64083.c +++ b/linux/drivers/media/video/upd64083.c @@ -20,7 +20,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "compat.h" #include #include #include @@ -28,6 +27,7 @@ #include #include #include +#include "compat.h" MODULE_DESCRIPTION("uPD64083 driver"); MODULE_AUTHOR("T. Adachi, Takeru KOMORIYA, Hans Verkuil"); -- cgit v1.2.3 From 547bf60a782e5d6397e4ed6c001bd1ae0633d8f0 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 24 Feb 2007 00:55:14 +0100 Subject: Improve chip matching in v4l2_register for VIDIOC_DBG_G/S_REGISTER From: Hans Verkuil The chip matching in struct v4l2_register was rather primitive. It could not be extended to other busses besides i2c and it lacked a way to differentiate between two i2c chips driven by the same driver on one board (e.g. a PVR500 with two tuner chips, one for analog TV and one for radio). It has now been improved making it much more powerful. Signed-off-by: Hans Verkuil CC: Mike Isely CC: Trent Piepho --- linux/drivers/media/video/upd64083.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers/media/video/upd64083.c') diff --git a/linux/drivers/media/video/upd64083.c b/linux/drivers/media/video/upd64083.c index 1fdde6e06..317baed46 100644 --- a/linux/drivers/media/video/upd64083.c +++ b/linux/drivers/media/video/upd64083.c @@ -152,7 +152,7 @@ static int upd64083_command(struct i2c_client *client, unsigned int cmd, void *a { struct v4l2_register *reg = arg; - if (reg->i2c_id != I2C_DRIVERID_UPD64083) + if (!v4l2_chip_match_i2c_client(client, reg->match_type, reg->match_chip)) return -EINVAL; if (!capable(CAP_SYS_ADMIN)) return -EPERM; -- cgit v1.2.3