Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

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

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


marcos.souza.org at gmail

Apr 17, 2012, 9:30 PM

Post #1 of 4 (70 views)
Permalink
[PATCH 06/12] drivers: media: video: tlg2300: pd-video.c: Include version.h header

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.

Cc: Mauro Carvalho Chehab <mchehab [at] infradead>
Cc: Huang Shijie <shijie8 [at] gmail>
Cc: Kang Yong <kangyong [at] telegent>
Cc: Zhang Xiaobing <xbzhang [at] telegent>
Cc: <linux-media [at] vger>
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org [at] gmail>
---
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>
--
1.7.7.6

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


mchehab at redhat

Apr 19, 2012, 12:39 PM

Post #2 of 4 (65 views)
Permalink
Re: [PATCH 06/12] drivers: media: video: tlg2300: pd-video.c: Include version.h header [In reply to]

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 [at] infradead>
> Cc: Huang Shijie <shijie8 [at] gmail>
> Cc: Kang Yong <kangyong [at] telegent>
> Cc: Zhang Xiaobing <xbzhang [at] telegent>
> Cc: <linux-media [at] vger>
> Signed-off-by: Marcos Paulo de Souza <marcos.souza.org [at] gmail>
> ---
> 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 [at] redhat>
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 [at] gmail>
Signed-off-by: Mauro Carvalho Chehab <mchehab [at] redhat>

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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


marcos.souza.org at gmail

Apr 19, 2012, 12:46 PM

Post #3 of 4 (66 views)
Permalink
Re: [PATCH 06/12] drivers: media: video: tlg2300: pd-video.c: Include version.h header [In reply to]

Em 19 de abril de 2012 16:39, Mauro Carvalho Chehab
<mchehab [at] redhat> escreveu:
> 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 [at] infradead>
>> Cc: Huang Shijie <shijie8 [at] gmail>
>> Cc: Kang Yong <kangyong [at] telegent>
>> Cc: Zhang Xiaobing <xbzhang [at] telegent>
>> Cc: <linux-media [at] vger>
>> Signed-off-by: Marcos Paulo de Souza <marcos.souza.org [at] gmail>
>> ---
>>  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 [at] redhat>
> 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 [at] gmail>
>    Signed-off-by: Mauro Carvalho Chehab <mchehab [at] redhat>
>
> 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;

Better yet :)

Thanks for the feedback Mauro!

--
Att,

Marcos Paulo de Souza
Acadêmico de Ciencia da Computação - FURB - SC
"Uma vida sem desafios é uma vida sem razão"
"A life without challenges, is a non reason life"
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


shijie8 at gmail

Apr 19, 2012, 7:14 PM

Post #4 of 4 (64 views)
Permalink
Re: [PATCH 06/12] drivers: media: video: tlg2300: pd-video.c: Include version.h header [In reply to]

Hi Mauro:

On Fri, Apr 20, 2012 at 3:39 AM, Mauro Carvalho Chehab
<mchehab [at] redhat> 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 [at] infradead>
>> Cc: Huang Shijie <shijie8 [at] gmail>
>> Cc: Kang Yong <kangyong [at] telegent>
>> Cc: Zhang Xiaobing <xbzhang [at] telegent>
>> Cc: <linux-media [at] vger>
>> Signed-off-by: Marcos Paulo de Souza <marcos.souza.org [at] gmail>
>> ---
>>  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 [at] redhat>
> 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 [at] gmail>
>    Signed-off-by: Mauro Carvalho Chehab <mchehab [at] redhat>
>
> 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 [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.