linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [media] tea5764: Fix module parameter permissions
@ 2011-07-08  9:00 Jean Delvare
  2011-07-08 10:34 ` Andy Walls
  0 siblings, 1 reply; 5+ messages in thread
From: Jean Delvare @ 2011-07-08  9:00 UTC (permalink / raw)
  To: linux-media; +Cc: Mauro Carvalho Chehab, Fabio Belavenuto

The third parameter of module_param is supposed to represent sysfs
file permissions. A value of "1" leads to the following:

$ ls -l /sys/module/radio_tea5764/parameters/
total 0
---------x 1 root root 4096 Jul  8 09:17 use_xtal

I am changing it to "0" to align with the other module parameters in
this driver.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Fabio Belavenuto <belavenuto@gmail.com>
---
 drivers/media/radio/radio-tea5764.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-3.0-rc6.orig/drivers/media/radio/radio-tea5764.c	2011-05-20 10:41:19.000000000 +0200
+++ linux-3.0-rc6/drivers/media/radio/radio-tea5764.c	2011-07-08 09:15:16.000000000 +0200
@@ -596,7 +596,7 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
 
-module_param(use_xtal, int, 1);
+module_param(use_xtal, int, 0);
 MODULE_PARM_DESC(use_xtal, "Chip have a xtal connected in board");
 module_param(radio_nr, int, 0);
 MODULE_PARM_DESC(radio_nr, "video4linux device number to use");

-- 
Jean Delvare
Suse L3

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] [media] tea5764: Fix module parameter permissions
  2011-07-08  9:00 [PATCH] [media] tea5764: Fix module parameter permissions Jean Delvare
@ 2011-07-08 10:34 ` Andy Walls
  2011-07-11 11:54   ` Jean Delvare
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Walls @ 2011-07-08 10:34 UTC (permalink / raw)
  To: Jean Delvare, linux-media; +Cc: Mauro Carvalho Chehab, Fabio Belavenuto

Jean Delvare <jdelvare@suse.de> wrote:

>The third parameter of module_param is supposed to represent sysfs
>file permissions. A value of "1" leads to the following:
>
>$ ls -l /sys/module/radio_tea5764/parameters/
>total 0
>---------x 1 root root 4096 Jul  8 09:17 use_xtal
>
>I am changing it to "0" to align with the other module parameters in
>this driver.
>
>Signed-off-by: Jean Delvare <jdelvare@suse.de>
>Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
>Cc: Fabio Belavenuto <belavenuto@gmail.com>
>---
> drivers/media/radio/radio-tea5764.c |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>--- linux-3.0-rc6.orig/drivers/media/radio/radio-tea5764.c	2011-05-20
>10:41:19.000000000 +0200
>+++ linux-3.0-rc6/drivers/media/radio/radio-tea5764.c	2011-07-08
>09:15:16.000000000 +0200
>@@ -596,7 +596,7 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
> MODULE_DESCRIPTION(DRIVER_DESC);
> MODULE_LICENSE("GPL");
> 
>-module_param(use_xtal, int, 1);
>+module_param(use_xtal, int, 0);
> MODULE_PARM_DESC(use_xtal, "Chip have a xtal connected in board");
> module_param(radio_nr, int, 0);
> MODULE_PARM_DESC(radio_nr, "video4linux device number to use");
>
>-- 
>Jean Delvare
>Suse L3
>--
>To unsubscribe from this list: send the line "unsubscribe linux-media"
>in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html

To whomever might know:

Was the intent of the "1" to set the default value of the parameter?

Regards,
Andy

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] [media] tea5764: Fix module parameter permissions
  2011-07-08 10:34 ` Andy Walls
@ 2011-07-11 11:54   ` Jean Delvare
  2011-07-11 12:25     ` Fabio Belavenuto
  0 siblings, 1 reply; 5+ messages in thread
From: Jean Delvare @ 2011-07-11 11:54 UTC (permalink / raw)
  To: Andy Walls; +Cc: linux-media, Mauro Carvalho Chehab, Fabio Belavenuto

Hi Andy,

On Friday 08 July 2011 12:34:38 pm Andy Walls wrote:
> Jean Delvare <jdelvare@suse.de> wrote:
> >The third parameter of module_param is supposed to represent sysfs
> >file permissions. A value of "1" leads to the following:
> >
> >$ ls -l /sys/module/radio_tea5764/parameters/
> >total 0
> >---------x 1 root root 4096 Jul  8 09:17 use_xtal
> >
> >I am changing it to "0" to align with the other module parameters in
> >this driver.
> >
> >Signed-off-by: Jean Delvare <jdelvare@suse.de>
> >Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
> >Cc: Fabio Belavenuto <belavenuto@gmail.com>
> >---
> > drivers/media/radio/radio-tea5764.c |    2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >---
> > linux-3.0-rc6.orig/drivers/media/radio/radio-tea5764.c	2011-05-20
> > 10:41:19.000000000 +0200
> >+++ linux-3.0-rc6/drivers/media/radio/radio-tea5764.c	2011-07-08
> >09:15:16.000000000 +0200
> >@@ -596,7 +596,7 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
> > MODULE_DESCRIPTION(DRIVER_DESC);
> > MODULE_LICENSE("GPL");
> >
> >-module_param(use_xtal, int, 1);
> >+module_param(use_xtal, int, 0);
> > MODULE_PARM_DESC(use_xtal, "Chip have a xtal connected in board");
> > module_param(radio_nr, int, 0);
> > MODULE_PARM_DESC(radio_nr, "video4linux device number to use");
> 
> To whomever might know:
> 
> Was the intent of the "1" to set the default value of the parameter?

My guess is yes, and as a matter of fact 1 is indeed the default value 
of use_xtal. Only the author of the code (Fabio Belavenuto) could tell 
for sure, but he seems to be no longer involved so I wouldn't wait for 
him.

-- 
Jean Delvare
Suse L3

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] [media] tea5764: Fix module parameter permissions
  2011-07-11 11:54   ` Jean Delvare
@ 2011-07-11 12:25     ` Fabio Belavenuto
  2011-07-13 14:35       ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 5+ messages in thread
From: Fabio Belavenuto @ 2011-07-11 12:25 UTC (permalink / raw)
  To: Jean Delvare; +Cc: Andy Walls, linux-media, Mauro Carvalho Chehab

Hi,

I'm the author. Sorry for my bad english, I'm from Brazil. :D

Yes, the intent of the "1" is to set the default value, in case
compile built-in.

I like the module to be generic, decided to choose enabled by default.

Fábio

2011/7/11 Jean Delvare <jdelvare@suse.de>:
> Hi Andy,
>
> On Friday 08 July 2011 12:34:38 pm Andy Walls wrote:
>> Jean Delvare <jdelvare@suse.de> wrote:
>> >The third parameter of module_param is supposed to represent sysfs
>> >file permissions. A value of "1" leads to the following:
>> >
>> >$ ls -l /sys/module/radio_tea5764/parameters/
>> >total 0
>> >---------x 1 root root 4096 Jul  8 09:17 use_xtal
>> >
>> >I am changing it to "0" to align with the other module parameters in
>> >this driver.
>> >
>> >Signed-off-by: Jean Delvare <jdelvare@suse.de>
>> >Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
>> >Cc: Fabio Belavenuto <belavenuto@gmail.com>
>> >---
>> > drivers/media/radio/radio-tea5764.c |    2 +-
>> > 1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> >---
>> > linux-3.0-rc6.orig/drivers/media/radio/radio-tea5764.c      2011-05-20
>> > 10:41:19.000000000 +0200
>> >+++ linux-3.0-rc6/drivers/media/radio/radio-tea5764.c        2011-07-08
>> >09:15:16.000000000 +0200
>> >@@ -596,7 +596,7 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
>> > MODULE_DESCRIPTION(DRIVER_DESC);
>> > MODULE_LICENSE("GPL");
>> >
>> >-module_param(use_xtal, int, 1);
>> >+module_param(use_xtal, int, 0);
>> > MODULE_PARM_DESC(use_xtal, "Chip have a xtal connected in board");
>> > module_param(radio_nr, int, 0);
>> > MODULE_PARM_DESC(radio_nr, "video4linux device number to use");
>>
>> To whomever might know:
>>
>> Was the intent of the "1" to set the default value of the parameter?
>
> My guess is yes, and as a matter of fact 1 is indeed the default value
> of use_xtal. Only the author of the code (Fabio Belavenuto) could tell
> for sure, but he seems to be no longer involved so I wouldn't wait for
> him.
>
> --
> Jean Delvare
> Suse L3
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] [media] tea5764: Fix module parameter permissions
  2011-07-11 12:25     ` Fabio Belavenuto
@ 2011-07-13 14:35       ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 5+ messages in thread
From: Mauro Carvalho Chehab @ 2011-07-13 14:35 UTC (permalink / raw)
  To: Fabio Belavenuto; +Cc: Jean Delvare, Andy Walls, linux-media

Em 11-07-2011 09:25, Fabio Belavenuto escreveu:
> Hi,
> 
> I'm the author. Sorry for my bad english, I'm from Brazil. :D
> 
> Yes, the intent of the "1" is to set the default value, in case
> compile built-in.
> 
> I like the module to be generic, decided to choose enabled by default.
> 
> Fábio
> 
> 2011/7/11 Jean Delvare <jdelvare@suse.de>:
>> Hi Andy,
>>
>> On Friday 08 July 2011 12:34:38 pm Andy Walls wrote:
>>> Jean Delvare <jdelvare@suse.de> wrote:
>>>> The third parameter of module_param is supposed to represent sysfs
>>>> file permissions. A value of "1" leads to the following:
>>>>
>>>> $ ls -l /sys/module/radio_tea5764/parameters/
>>>> total 0
>>>> ---------x 1 root root 4096 Jul  8 09:17 use_xtal
>>>>
>>>> I am changing it to "0" to align with the other module parameters in
>>>> this driver.
>>>>
>>>> Signed-off-by: Jean Delvare <jdelvare@suse.de>
>>>> Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
>>>> Cc: Fabio Belavenuto <belavenuto@gmail.com>
>>>> ---
>>>> drivers/media/radio/radio-tea5764.c |    2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> ---
>>>> linux-3.0-rc6.orig/drivers/media/radio/radio-tea5764.c      2011-05-20
>>>> 10:41:19.000000000 +0200
>>>> +++ linux-3.0-rc6/drivers/media/radio/radio-tea5764.c        2011-07-08
>>>> 09:15:16.000000000 +0200
>>>> @@ -596,7 +596,7 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
>>>> MODULE_DESCRIPTION(DRIVER_DESC);
>>>> MODULE_LICENSE("GPL");
>>>>
>>>> -module_param(use_xtal, int, 1);
>>>> +module_param(use_xtal, int, 0);
>>>> MODULE_PARM_DESC(use_xtal, "Chip have a xtal connected in board");
>>>> module_param(radio_nr, int, 0);
>>>> MODULE_PARM_DESC(radio_nr, "video4linux device number to use");
>>>
>>> To whomever might know:
>>>
>>> Was the intent of the "1" to set the default value of the parameter?
>>
>> My guess is yes, and as a matter of fact 1 is indeed the default value
>> of use_xtal. Only the author of the code (Fabio Belavenuto) could tell
>> for sure, but he seems to be no longer involved so I wouldn't wait for
>> him.

The value there is not the default value, but the permissions. From what
I understand, the xtal frequency should be set at boot time, so setting
it to 000 seems to do the work. So, I'm applying Jean's patch.

>>
>> --
>> Jean Delvare
>> Suse L3
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-07-13 14:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-08  9:00 [PATCH] [media] tea5764: Fix module parameter permissions Jean Delvare
2011-07-08 10:34 ` Andy Walls
2011-07-11 11:54   ` Jean Delvare
2011-07-11 12:25     ` Fabio Belavenuto
2011-07-13 14:35       ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).