All of lore.kernel.org
 help / color / mirror / Atom feed
* [2.6.29.y PATCH] V4L: v4l2-common: remove incorrect MODULE test
@ 2009-03-31 13:23 Michael Krufky
  2009-04-02  6:43 ` patch v4l-v4l2-common-remove-incorrect-module-test.patch queued to 2.6.29.y-stable tree chrisw
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Krufky @ 2009-03-31 13:23 UTC (permalink / raw)
  To: stable; +Cc: Linux Media Mailing List, Hans Verkuil

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



[-- Attachment #2: 0001-V4L-v4l2-common-remove-incorrect-MODULE-test.patch --]
[-- Type: text/x-diff, Size: 2083 bytes --]

>From ba6b8068cf8f428f296762146cef6aafc4686f81 Mon Sep 17 00:00:00 2001
From: Hans Verkuil <hverkuil@xs4all.nl>
Date: Wed, 18 Mar 2009 15:48:01 -0300
Subject: [PATCH] V4L: v4l2-common: remove incorrect MODULE test

v4l2-common doesn't have to be a module for it to call request_module().
Just remove that test.

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.

Thanks-to: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Thanks-to: Mark Lord <lkml@rtr.ca>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
(cherry picked from commit d64260d58865004c6354e024da3450fdd607ea07)
---
 drivers/media/video/v4l2-common.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c
index b8f2be8..907cd02 100644
--- a/drivers/media/video/v4l2-common.c
+++ b/drivers/media/video/v4l2-common.c
@@ -910,10 +910,10 @@ struct v4l2_subdev *v4l2_i2c_new_subdev(struct i2c_adapter *adapter,
 	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 v4l2_subdev *v4l2_i2c_new_probed_subdev(struct i2c_adapter *adapter,
 	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));
-- 
1.5.4.3


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

* patch v4l-v4l2-common-remove-incorrect-module-test.patch queued to 2.6.29.y-stable tree
  2009-03-31 13:23 [2.6.29.y PATCH] V4L: v4l2-common: remove incorrect MODULE test Michael Krufky
@ 2009-04-02  6:43 ` chrisw
  0 siblings, 0 replies; 2+ messages in thread
From: chrisw @ 2009-04-02  6:43 UTC (permalink / raw)
  To: mkrufky, chrisw, g.liakhovetski, hverkuil, linux-media, lkml, mchehab
  Cc: stable, stable-commits


This is a note to let you know that we have just queued up the patch titled

     Subject: V4L: v4l2-common: remove incorrect MODULE test

to the 2.6.29.y-stable tree.  Its filename is

     v4l-v4l2-common-remove-incorrect-module-test.patch

A git repo of this tree can be found at 
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary


>From chrisw@hera.kernel.org  Wed Apr  1 23:18:58 2009
Message-ID: <49D21938.3000907@linuxtv.org>
Date: Tue, 31 Mar 2009 09:23:04 -0400
From: Michael Krufky <mkrufky@linuxtv.org>
To: stable@kernel.org
Cc: Hans Verkuil <hverkuil@xs4all.nl>, Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: V4L: v4l2-common: remove incorrect MODULE test

From: Hans Verkuil <hverkuil@xs4all.nl>

upstream commit: d64260d58865004c6354e024da3450fdd607ea07

v4l2-common doesn't have to be a module for it to call request_module().
Just remove that test.

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.

Thanks-to: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Thanks-to: Mark Lord <lkml@rtr.ca>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
 drivers/media/video/v4l2-common.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/drivers/media/video/v4l2-common.c
+++ b/drivers/media/video/v4l2-common.c
@@ -910,10 +910,10 @@ struct v4l2_subdev *v4l2_i2c_new_subdev(
 	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 v4l2_subdev *v4l2_i2c_new_probed_
 	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));


Patches currently in stable-queue which might be from mkrufky@linuxtv.org are


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

end of thread, other threads:[~2009-04-02  7:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-31 13:23 [2.6.29.y PATCH] V4L: v4l2-common: remove incorrect MODULE test Michael Krufky
2009-04-02  6:43 ` patch v4l-v4l2-common-remove-incorrect-module-test.patch queued to 2.6.29.y-stable tree chrisw

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.