Re: [PATCH 06/12] drivers: media: video: tlg2300: pd-video.c: Includeversion.h header

From: Huang Shijie
Date: Thu Apr 19 2012 - 22:15:03 EST


Hi Mauro:

On Fri, Apr 20, 2012 at 3:39 AM, Mauro Carvalho Chehab
<mchehab@xxxxxxxxxx> wrote:
> 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 <mchehab@xxxxxxxxxxxxx>
>> Cc: Huang Shijie <shijie8@xxxxxxxxx>
>> Cc: Kang Yong <kangyong@xxxxxxxxxxxx>
>> Cc: Zhang Xiaobing <xbzhang@xxxxxxxxxxxx>
>> Cc: <linux-media@xxxxxxxxxxxxxxx>
>> Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@xxxxxxxxx>
>> ---
>> Â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 <linux/mm.h>
>> Â#include <linux/sched.h>
>> Â#include <linux/slab.h>
>> +#include <linux/version.h>
>>
>> Â#include <media/v4l2-ioctl.h>
>> Â#include <media/v4l2-dev.h>
>
> commit f8bf305b7103857708cd22b504a70ea4a08022fc
> Author: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
> 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 <marcos.souza.org@xxxxxxxxx>
> Â ÂSigned-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
>
> 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;

thanks a lot.

Huang Shijie
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/