From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mx1.redhat.com ([209.132.183.28]:14078 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932167Ab2DSTjl (ORCPT ); Thu, 19 Apr 2012 15:39:41 -0400 Message-ID: <4F9069F2.8020201@redhat.com> Date: Thu, 19 Apr 2012 16:39:30 -0300 From: Mauro Carvalho Chehab MIME-Version: 1.0 To: Marcos Paulo de Souza CC: linux-kernel@vger.kernel.org, Mauro Carvalho Chehab , Huang Shijie , Kang Yong , Zhang Xiaobing , linux-media@vger.kernel.org Subject: Re: [PATCH 06/12] drivers: media: video: tlg2300: pd-video.c: Include version.h header References: <1334723412-5034-1-git-send-email-marcos.souza.org@gmail.com> <1334723412-5034-7-git-send-email-marcos.souza.org@gmail.com> In-Reply-To: <1334723412-5034-7-git-send-email-marcos.souza.org@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-media-owner@vger.kernel.org List-ID: Em 18-04-2012 01:30, Marcos Paulo de Souza escreveu: > The output of "make versioncheck" told us that: > > drivers/media/video/tlg2300/pd-video.c: 1669: need linux/version.h > > If we take a look at the code, we can see that this file uses the macro > KERNEL_VERSION. So, we need this include. Nack. The right fix here is just the opposite: to remove the KERNEL_VERSION() call. The V4L2 core now fills it automatically, so drivers shouldn't touch on cap->version anymore. See the enclosed patch. > > Cc: Mauro Carvalho Chehab > Cc: Huang Shijie > Cc: Kang Yong > Cc: Zhang Xiaobing > Cc: > Signed-off-by: Marcos Paulo de Souza > --- > drivers/media/video/tlg2300/pd-video.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/drivers/media/video/tlg2300/pd-video.c b/drivers/media/video/tlg2300/pd-video.c > index a794ae6..069db9a 100644 > --- a/drivers/media/video/tlg2300/pd-video.c > +++ b/drivers/media/video/tlg2300/pd-video.c > @@ -5,6 +5,7 @@ > #include > #include > #include > +#include > > #include > #include commit f8bf305b7103857708cd22b504a70ea4a08022fc Author: Mauro Carvalho Chehab Date: Thu Apr 19 16:35:27 2012 -0300 tlg2300: Remove usage of KERNEL_VERSION() As reported by Marcos: On 04-18-2012 01:30, Marcos Paulo de Souza wrote: > The output of "make versioncheck" told us that: > > drivers/media/video/tlg2300/pd-video.c: 1669: need linux/version.h > > If we take a look at the code, we can see that this file uses the macro > KERNEL_VERSION. The V4L2 core now fills it automatically, so drivers shouldn't touch on cap->version anymore. Reported by: Marcos Paulo de Souza Signed-off-by: Mauro Carvalho Chehab diff --git a/drivers/media/video/tlg2300/pd-video.c b/drivers/media/video/tlg2300/pd-video.c index a794ae6..bfbf9e5 100644 --- a/drivers/media/video/tlg2300/pd-video.c +++ b/drivers/media/video/tlg2300/pd-video.c @@ -150,7 +150,6 @@ static int vidioc_querycap(struct file *file, void *fh, strcpy(cap->driver, "tele-video"); strcpy(cap->card, "Telegent Poseidon"); usb_make_path(p->udev, cap->bus_info, sizeof(cap->bus_info)); - cap->version = KERNEL_VERSION(0, 0, 1); cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_TUNER | V4L2_CAP_AUDIO | V4L2_CAP_STREAMING | V4L2_CAP_READWRITE | V4L2_CAP_VBI_CAPTURE;