linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Rini <trini@kernel.crashing.org>
To: Linus Torvalds <torvalds@transmeta.com>,
	Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, linux-kernel@vger.kernel.org
Subject: [PATCH] Fix CONFIG_VIDEO_DEV=y
Date: Tue, 11 Jun 2002 14:31:11 -0700	[thread overview]
Message-ID: <20020611213111.GB13541@opus.bloom.county> (raw)

Currently 2.4.19-pre10 and 2.5.21 won't compile if CONFIG_VIDEO_DEV=y.

The problem is that videodev_proc_destroy() is protected by MODULE &&
CONFIG_PROC_FS && CONFIG_VIDEO_PROC_FS.  Additionally, all calls to
videodev_proc_create() are protected by CONFIG_PROC_FS &&
CONFIG_VIDEO_PROC_FS but the function itself (which is static) is not.

This hides both functions within CONFIG_PROC_FS && CONFIG_VIDEO_PROC_FS
tests.

-- 
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

===== drivers/media/video/videodev.c 1.10 vs edited =====
--- 1.10/drivers/media/video/videodev.c	Thu May  2 08:48:22 2002
+++ edited/drivers/media/video/videodev.c	Tue Jun 11 14:27:08 2002
@@ -394,6 +394,7 @@
 	return len;
 }
 
+#if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
 static void videodev_proc_create(void)
 {
 	video_proc_entry = create_proc_entry("video", S_IFDIR, &proc_root);
@@ -414,8 +415,6 @@
 	video_dev_proc_entry->owner = THIS_MODULE;
 }
 
-#ifdef MODULE
-#if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
 static void videodev_proc_destroy(void)
 {
 	if (video_dev_proc_entry != NULL)
@@ -424,7 +423,6 @@
 	if (video_proc_entry != NULL)
 		remove_proc_entry("video", &proc_root);
 }
-#endif
 #endif
 
 static void videodev_proc_create_dev (struct video_device *vfd, char *name)

                 reply	other threads:[~2002-06-11 21:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020611213111.GB13541@opus.bloom.county \
    --to=trini@kernel.crashing.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).