Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 17 Apr 2002 12:00:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 17 Apr 2002 12:00:36 -0400 Received: from ns1.alcove-solutions.com ([212.155.209.139]:33740 "EHLO smtp-out.fr.alcove.com") by vger.kernel.org with ESMTP id ; Wed, 17 Apr 2002 12:00:27 -0400 Date: Wed, 17 Apr 2002 18:00:25 +0200 From: Stelian Pop To: Linux Kernel Mailing List Cc: Linus Torvalds Subject: [BKPATCH 2.5] meye driver: get parameters from the kernel command line Message-ID: <20020417160025.GI1519@come.alcove-fr> Reply-To: Stelian Pop Mail-Followup-To: Stelian Pop , Linux Kernel Mailing List , Linus Torvalds Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.25i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hi, This patch enables the meye driver to get its parameters from the kernel command line using a "meye=" style syntax. Linus, please apply. Stelian. You can import this changeset into BK by piping this whole message to '| bk receive [path to repository]' or apply the patch as usual. =================================================================== ChangeSet@1.533, 2002-04-17 16:54:44+02:00, stelian@popies.net Enable the meye driver to get parameters on the kernel command line. Documentation/video4linux/meye.txt | 10 +++++++++- drivers/media/video/meye.c | 21 +++++++++++++++++++++ drivers/media/video/meye.h | 2 +- 3 files changed, 31 insertions(+), 2 deletions(-) diff -Nru a/Documentation/video4linux/meye.txt b/Documentation/video4linux/meye.txt --- a/Documentation/video4linux/meye.txt Wed Apr 17 16:55:08 2002 +++ b/Documentation/video4linux/meye.txt Wed Apr 17 16:55:08 2002 @@ -15,8 +15,16 @@ MJPEG hardware grabbing is supported via a private API (see below). -Module options: +Driver options: --------------- + +Several options can be passed to the meye driver, either by adding them +to /etc/modules.conf file, when the driver is compiled as a module, or +by adding the following to the kernel command line (in your bootloader): + + meye=gbuffers[,gbufsize[,video_nr]] + +where: gbuffers: number of capture buffers, default is 2 (32 max) diff -Nru a/drivers/media/video/meye.c b/drivers/media/video/meye.c --- a/drivers/media/video/meye.c Wed Apr 17 16:55:08 2002 +++ b/drivers/media/video/meye.c Wed Apr 17 16:55:08 2002 @@ -1420,6 +1420,27 @@ pci_unregister_driver(&meye_driver); } +#ifndef MODULE +static int __init meye_setup(char *str) { + int ints[4]; + + str = get_options(str, ARRAY_SIZE(ints), ints); + if (ints[0] <= 0) + goto out; + gbuffers = ints[1]; + if (ints[0] == 1) + goto out; + gbufsize = ints[2]; + if (ints[0] == 2) + goto out; + video_nr = ints[3]; +out: + return 1; +} + +__setup("meye=", meye_setup); +#endif + MODULE_AUTHOR("Stelian Pop "); MODULE_DESCRIPTION("video4linux driver for the MotionEye camera"); MODULE_LICENSE("GPL"); diff -Nru a/drivers/media/video/meye.h b/drivers/media/video/meye.h --- a/drivers/media/video/meye.h Wed Apr 17 16:55:08 2002 +++ b/drivers/media/video/meye.h Wed Apr 17 16:55:08 2002 @@ -29,7 +29,7 @@ #define _MEYE_PRIV_H_ #define MEYE_DRIVER_MAJORVERSION 1 -#define MEYE_DRIVER_MINORVERSION 3 +#define MEYE_DRIVER_MINORVERSION 4 /****************************************************************************/ /* Motion JPEG chip registers */ =================================================================== This BitKeeper patch contains the following changesets: + ## Wrapped with gzip_uu ## begin 664 bkpatch17009 M'XL(`,R,O3P``\U7;6_;-A#^;/Z*0_,E7AV+I"C95N:A66UT1ILF<)`!7188 MM$1%0F72D.BDZ;3_OI,<-YWC)$Y6#/$+(1_OCG?/\>'1.W!:J#QH%%9EJ=1D M!WXSA0T:W M":R[$*S#A/!XKV2,,TH&P-J>ZP+E#A4.ZP#S`T\$0KRF/*`4[GJ$UR[L4?(K M_-C0WY(0AEI.,P4V43!3UPJB/$5`<2&XP'7G,I?H'A$&HVNE91T`EYM)'0'6 M0[7)>V!4^)0)MP MCU&7E8(S3Y2>)V4H12?B?!I2M@'81UW6M?.$ZY?XV'UN?,G=^-R.5T9N''=Z MO!LJ-Y[ZL?>D`)/U`+GK=;V'`QR8<#%3VDJ;&KUT)FI&+5W:+_9.H+3G>V5W M.NTJWHF$Z,F.8-&F0+?U_1VB?J_CU_1\W+;B[?^0V`]:`P?7PS6Z/EW2_0[9 M7?\!LO=@C[UDLM=U.X*]_*K^('>/MRCA,TZ$`>L"(Z-Z'"QC-?-J@2)`:0^Z MY$]RHE`LL]4$A%+#5&$R1:&B*K6U;%N@4A3E,+T&&46IOJ@T9M@5P%$V=&8F M6F18B=#H&.(T4RVX2M02CQN\TJ*"9(YS$<@")"QM6F!R\B^O$)LL,U?U+W,? MHK";:K@V"XP(VUYF9*3R9H"9-:JH^Q?311QC3B<[/SU$- MH\M54//H_M/L$?[\QY-U4Q/09!1DQP#IR1G336D8KA\&AP^F&(]4`>AI!J"Y,)7J!LG<:D4'8QWPT3F<-/ MAU!/B7/ MY=.6-X$G$>K&I\L$\YGOBOHF();7S"?QB;WPOK.\X6S+I^0Y##\>CWX7AR./IX-,:'D]'1QX:X_0\2)BK\7"QF?=>/?=6+IN0? (K3)?N>@,```` ` end -- Stelian Pop Alcove - http://www.alcove.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/