public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: dt3155: properly export the module parameter
@ 2010-07-28 16:48 H Hartley Sweeten
  2010-07-28 20:59 ` Jiri Slaby
  0 siblings, 1 reply; 6+ messages in thread
From: H Hartley Sweeten @ 2010-07-28 16:48 UTC (permalink / raw)
  To: Linux Kernel; +Cc: devel, gregkh, ss

Make the module parameter dt3155_major static and add the proper
wrappers to export it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Scott Smedley <ss@aao.gov.au>
---

diff --git a/drivers/staging/dt3155/dt3155_drv.c b/drivers/staging/dt3155/dt3155_drv.c
index 7316996..220eaf9 100644
--- a/drivers/staging/dt3155/dt3155_drv.c
+++ b/drivers/staging/dt3155/dt3155_drv.c
@@ -99,7 +99,9 @@ wait_queue_head_t dt3155_read_wait_queue[MAXBOARDS];
 
 /* set to dynamicaly allocate, but it is tunable: */
 /* insmod DT_3155 dt3155 dt3155_major=XX */
-int dt3155_major = 0;
+static int dt3155_major;
+module_param(dt3155_major, int, 0);
+MODULE_PARM_DESC(dt3155_major, "Major device number");
 
 /* The minor numbers are 0 and 1 ... they are not tunable.
  * They are used as the indices for the structure vectors,

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

* Re: [PATCH] Staging: dt3155: properly export the module parameter
  2010-07-28 16:48 [PATCH] Staging: dt3155: properly export the module parameter H Hartley Sweeten
@ 2010-07-28 20:59 ` Jiri Slaby
  2010-07-29  0:55   ` H Hartley Sweeten
  0 siblings, 1 reply; 6+ messages in thread
From: Jiri Slaby @ 2010-07-28 20:59 UTC (permalink / raw)
  To: H Hartley Sweeten; +Cc: Linux Kernel, devel, ss, gregkh

On 07/28/2010 06:48 PM, H Hartley Sweeten wrote:
> Make the module parameter dt3155_major static and add the proper
> wrappers to export it.
> 
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Greg Kroah-Hartman <gregkh@suse.de>
> Cc: Scott Smedley <ss@aao.gov.au>
> ---
> 
> diff --git a/drivers/staging/dt3155/dt3155_drv.c b/drivers/staging/dt3155/dt3155_drv.c
> index 7316996..220eaf9 100644
> --- a/drivers/staging/dt3155/dt3155_drv.c
> +++ b/drivers/staging/dt3155/dt3155_drv.c
> @@ -99,7 +99,9 @@ wait_queue_head_t dt3155_read_wait_queue[MAXBOARDS];
>  
>  /* set to dynamicaly allocate, but it is tunable: */
>  /* insmod DT_3155 dt3155 dt3155_major=XX */
> -int dt3155_major = 0;
> +static int dt3155_major;
> +module_param(dt3155_major, int, 0);
> +MODULE_PARM_DESC(dt3155_major, "Major device number");

Is it necessary in the age of udev?

I would personally get rid of that completely...

regards,
-- 
js

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

* RE: [PATCH] Staging: dt3155: properly export the module parameter
  2010-07-28 20:59 ` Jiri Slaby
@ 2010-07-29  0:55   ` H Hartley Sweeten
  2010-07-29 13:09     ` Jiri Slaby
  0 siblings, 1 reply; 6+ messages in thread
From: H Hartley Sweeten @ 2010-07-29  0:55 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: Linux Kernel, devel@driverdev.osuosl.org, ss@aao.gov.au,
	gregkh@suse.de

On Wednesday, July 28, 2010 1:59 PM, Jiri Slaby wrote:
> On 07/28/2010 06:48 PM, H Hartley Sweeten wrote:
>> Make the module parameter dt3155_major static and add the proper
>> wrappers to export it.
>> 
>> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
>> Cc: Greg Kroah-Hartman <gregkh@suse.de>
>> Cc: Scott Smedley <ss@aao.gov.au>
>> ---
>> 
>> diff --git a/drivers/staging/dt3155/dt3155_drv.c b/drivers/staging/dt3155/dt3155_drv.c
>> index 7316996..220eaf9 100644
>> --- a/drivers/staging/dt3155/dt3155_drv.c
>> +++ b/drivers/staging/dt3155/dt3155_drv.c
>> @@ -99,7 +99,9 @@ wait_queue_head_t dt3155_read_wait_queue[MAXBOARDS];
>>  
>>  /* set to dynamicaly allocate, but it is tunable: */
>>  /* insmod DT_3155 dt3155 dt3155_major=XX */
>> -int dt3155_major = 0;
>> +static int dt3155_major;
>> +module_param(dt3155_major, int, 0);
>> +MODULE_PARM_DESC(dt3155_major, "Major device number");
>
> Is it necessary in the age of udev?
>
> I would personally get rid of that completely...

I agree but I'm not quite sure if the user space app is ready to handle that.

Scott, can you provide any input?

Regards,
Hartley

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

* Re: [PATCH] Staging: dt3155: properly export the module parameter
  2010-07-29  0:55   ` H Hartley Sweeten
@ 2010-07-29 13:09     ` Jiri Slaby
  2010-07-29 16:02       ` H Hartley Sweeten
  0 siblings, 1 reply; 6+ messages in thread
From: Jiri Slaby @ 2010-07-29 13:09 UTC (permalink / raw)
  To: H Hartley Sweeten
  Cc: Linux Kernel, devel@driverdev.osuosl.org, ss@aao.gov.au,
	gregkh@suse.de

On 07/29/2010 02:55 AM, H Hartley Sweeten wrote:
> On Wednesday, July 28, 2010 1:59 PM, Jiri Slaby wrote:
>> On 07/28/2010 06:48 PM, H Hartley Sweeten wrote:
>>> --- a/drivers/staging/dt3155/dt3155_drv.c
>>> +++ b/drivers/staging/dt3155/dt3155_drv.c
>>> @@ -99,7 +99,9 @@ wait_queue_head_t dt3155_read_wait_queue[MAXBOARDS];
>>>  
>>>  /* set to dynamicaly allocate, but it is tunable: */
>>>  /* insmod DT_3155 dt3155 dt3155_major=XX */
>>> -int dt3155_major = 0;
>>> +static int dt3155_major;
>>> +module_param(dt3155_major, int, 0);
>>> +MODULE_PARM_DESC(dt3155_major, "Major device number");
>>
>> Is it necessary in the age of udev?
>>
>> I would personally get rid of that completely...
> 
> I agree but I'm not quite sure if the user space app is ready to handle that.

Given it was never exposed as a parameter, applications should handle
that. 0 means allocate major dynamically...

regards,
-- 
js

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

* RE: [PATCH] Staging: dt3155: properly export the module parameter
  2010-07-29 13:09     ` Jiri Slaby
@ 2010-07-29 16:02       ` H Hartley Sweeten
  2010-08-03  1:05         ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: H Hartley Sweeten @ 2010-07-29 16:02 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: Linux Kernel, devel@driverdev.osuosl.org, ss@aao.gov.au,
	gregkh@suse.de

On Thursday, July 29, 2010 6:09 AM, Jiri Slaby wrote:
> On 07/29/2010 02:55 AM, H Hartley Sweeten wrote:
>> On Wednesday, July 28, 2010 1:59 PM, Jiri Slaby wrote:
>>> On 07/28/2010 06:48 PM, H Hartley Sweeten wrote:
>>>> --- a/drivers/staging/dt3155/dt3155_drv.c
>>>> +++ b/drivers/staging/dt3155/dt3155_drv.c
>>>> @@ -99,7 +99,9 @@ wait_queue_head_t dt3155_read_wait_queue[MAXBOARDS];
>>>>  
>>>>  /* set to dynamicaly allocate, but it is tunable: */
>>>>  /* insmod DT_3155 dt3155 dt3155_major=XX */
>>>> -int dt3155_major = 0;
>>>> +static int dt3155_major;
>>>> +module_param(dt3155_major, int, 0);
>>>> +MODULE_PARM_DESC(dt3155_major, "Major device number");
>>>
>>> Is it necessary in the age of udev?
>>>
>>> I would personally get rid of that completely...
>> 
>> I agree but I'm not quite sure if the user space app is ready to handle that.
>
> Given it was never exposed as a parameter, applications should handle
> that. 0 means allocate major dynamically...

Understood.

I finally found the "official" site for the "DT3155 Framegrabber Linux Device Driver"

http://sourceforge.net/projects/dt3155a/

The script provided to load the module does grep /proc/devices to determine the major
device number and then mknod's the appropriate devices.

I will update my patch and remove the "parameter" since it is not needed.

Thanks,
Hartley

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

* Re: [PATCH] Staging: dt3155: properly export the module parameter
  2010-07-29 16:02       ` H Hartley Sweeten
@ 2010-08-03  1:05         ` Greg KH
  0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2010-08-03  1:05 UTC (permalink / raw)
  To: H Hartley Sweeten
  Cc: Jiri Slaby, Linux Kernel, devel@driverdev.osuosl.org,
	ss@aao.gov.au, gregkh@suse.de

On Thu, Jul 29, 2010 at 11:02:38AM -0500, H Hartley Sweeten wrote:
> On Thursday, July 29, 2010 6:09 AM, Jiri Slaby wrote:
> > On 07/29/2010 02:55 AM, H Hartley Sweeten wrote:
> >> On Wednesday, July 28, 2010 1:59 PM, Jiri Slaby wrote:
> >>> On 07/28/2010 06:48 PM, H Hartley Sweeten wrote:
> >>>> --- a/drivers/staging/dt3155/dt3155_drv.c
> >>>> +++ b/drivers/staging/dt3155/dt3155_drv.c
> >>>> @@ -99,7 +99,9 @@ wait_queue_head_t dt3155_read_wait_queue[MAXBOARDS];
> >>>>  
> >>>>  /* set to dynamicaly allocate, but it is tunable: */
> >>>>  /* insmod DT_3155 dt3155 dt3155_major=XX */
> >>>> -int dt3155_major = 0;
> >>>> +static int dt3155_major;
> >>>> +module_param(dt3155_major, int, 0);
> >>>> +MODULE_PARM_DESC(dt3155_major, "Major device number");
> >>>
> >>> Is it necessary in the age of udev?
> >>>
> >>> I would personally get rid of that completely...
> >> 
> >> I agree but I'm not quite sure if the user space app is ready to handle that.
> >
> > Given it was never exposed as a parameter, applications should handle
> > that. 0 means allocate major dynamically...
> 
> Understood.
> 
> I finally found the "official" site for the "DT3155 Framegrabber Linux Device Driver"
> 
> http://sourceforge.net/projects/dt3155a/
> 
> The script provided to load the module does grep /proc/devices to determine the major
> device number and then mknod's the appropriate devices.
> 
> I will update my patch and remove the "parameter" since it is not needed.

As there is another driver already in the tree for this device,
dt3155v4l, I'm about to delete the dt3155 driver as it's no longer
needed.  So you might want to reconsider your work on this driver for
the near future.

thanks,

greg k-h

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

end of thread, other threads:[~2010-08-03  1:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-28 16:48 [PATCH] Staging: dt3155: properly export the module parameter H Hartley Sweeten
2010-07-28 20:59 ` Jiri Slaby
2010-07-29  0:55   ` H Hartley Sweeten
2010-07-29 13:09     ` Jiri Slaby
2010-07-29 16:02       ` H Hartley Sweeten
2010-08-03  1:05         ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox