public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* Patch for 2.6.29 stable series: remove #ifdef MODULE nonsense
@ 2009-03-30 16:35 Hans Verkuil
  2009-03-30 16:40 ` Michael Krufky
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Verkuil @ 2009-03-30 16:35 UTC (permalink / raw)
  To: Mike Krufky; +Cc: Mark Lord, linux-media

[-- Attachment #1: Type: text/plain, Size: 777 bytes --]

Hi Mike,

The attached patch should be queued for 2.6.29.X. It corresponds to 
changeset 11098 (v4l2-common: remove incorrect MODULE test) in our v4l-dvb 
tree and is part of the initial set of git patches going into 2.6.30.

Without this patch loading ivtv as a module while v4l2-common is compiled 
into the kernel will cause a delayed load of the i2c modules that ivtv 
needs since request_module is never called directly.

While it is nice to see the delayed load in action, it is not so nice in 
that ivtv fails to do a lot of necessary i2c initializations and will oops 
later on with a division-by-zero.

Thanks to Mark Lord for reporting this and helping me figure out what was 
wrong.

Regards,

	Hans

-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG

[-- Attachment #2: v4l2-common.c.diff --]
[-- Type: text/x-diff, Size: 683 bytes --]

--- drivers/media/video/v4l2-common.c.orig	2009-03-30 18:25:24.000000000 +0200
+++ drivers/media/video/v4l2-common.c	2009-03-30 18:27:04.000000000 +0200
@@ -910,10 +910,10 @@
 	struct i2c_board_info info;
 
 	BUG_ON(!dev);
-#ifdef MODULE
+
 	if (module_name)
 		request_module(module_name);
-#endif
+
 	/* Setup the i2c board info with the device type and
 	   the device address. */
 	memset(&info, 0, sizeof(info));
@@ -958,10 +958,10 @@
 	struct i2c_board_info info;
 
 	BUG_ON(!dev);
-#ifdef MODULE
+
 	if (module_name)
 		request_module(module_name);
-#endif
+
 	/* Setup the i2c board info with the device type and
 	   the device address. */
 	memset(&info, 0, sizeof(info));

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

end of thread, other threads:[~2009-03-30 17:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-30 16:35 Patch for 2.6.29 stable series: remove #ifdef MODULE nonsense Hans Verkuil
2009-03-30 16:40 ` Michael Krufky
2009-03-30 16:45   ` Mark Lord
2009-03-30 16:50     ` bttv ir patch from Mark Lord Michael Krufky
2009-03-30 17:05       ` Mark Lord
2009-03-30 17:06         ` Mark Lord
2009-03-30 17:11           ` Hans Verkuil
2009-03-30 17:31             ` Mark Lord

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