diff mbox

Patch for 2.6.29 stable series: remove #ifdef MODULE nonsense

Message ID 200903301835.55023.hverkuil@xs4all.nl (mailing list archive)
State RFC
Headers show

Commit Message

Hans Verkuil March 30, 2009, 4:35 p.m. UTC
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

Comments

Michael Ira Krufky March 30, 2009, 4:40 p.m. UTC | #1
Hans Verkuil wrote:
> 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
>
>   
Got it, thanks.

In the future, please point to hash codes rather than revision ID's -- 
my rev IDs are not the same as yours, but hash codes are always unique.

I'll queue this the moment Linus merges Mauro's pending request.

Cheers,

Mike
--
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
diff mbox

Patch

--- 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));