Message ID | 201107081100.37406.jdelvare@suse.de (mailing list archive) |
---|---|
State | Superseded, archived |
Headers |
Return-path: <mchehab@localhost> Envelope-to: mchehab@infradead.org Delivery-date: Fri, 08 Jul 2011 09:45:58 -0300 Received: from mchehab by infradead.org with local (Exim 4.72) (envelope-from <mchehab@infradead.org>) id 1QfARR-0003Ou-Ll for mchehab@infradead.org; Fri, 08 Jul 2011 09:45:57 -0300 Received: from casper.infradead.org [85.118.1.10] by pedra with IMAP (fetchmail-6.3.17) for <mchehab@localhost> (single-drop); Fri, 08 Jul 2011 09:45:57 -0300 (BRT) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Qf6vS-0004Kl-Q0; Fri, 08 Jul 2011 09:00:43 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754234Ab1GHJAk (ORCPT <rfc822; kmpark@infradead.org> + 1 other); Fri, 8 Jul 2011 05:00:40 -0400 Received: from cantor2.suse.de ([195.135.220.15]:53601 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751352Ab1GHJAj (ORCPT <rfc822;linux-media@vger.kernel.org>); Fri, 8 Jul 2011 05:00:39 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id CF6488A95F; Fri, 8 Jul 2011 11:00:38 +0200 (CEST) From: Jean Delvare <jdelvare@suse.de> Organization: Suse Linux To: linux-media@vger.kernel.org Subject: [PATCH] [media] tea5764: Fix module parameter permissions Date: Fri, 8 Jul 2011 11:00:37 +0200 User-Agent: KMail/1.12.4 (Linux/2.6.32.36-0.5-pae; KDE/4.3.5; i686; ; ) Cc: Mauro Carvalho Chehab <mchehab@infradead.org>, Fabio Belavenuto <belavenuto@gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201107081100.37406.jdelvare@suse.de> Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org Sender: <mchehab@infradead.org> |
Commit Message
Jean Delvare
July 8, 2011, 9 a.m. UTC
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(-)
Comments
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 -- 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
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.
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 > -- 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
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 -- 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
--- 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");