From patchwork Tue Mar 31 13:23:04 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Ira Krufky X-Patchwork-Id: 15367 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n2VDNHKp032359 for ; Tue, 31 Mar 2009 13:23:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758890AbZCaNXR (ORCPT ); Tue, 31 Mar 2009 09:23:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758842AbZCaNXR (ORCPT ); Tue, 31 Mar 2009 09:23:17 -0400 Received: from mail.hauppauge.com ([167.206.143.4]:1242 "EHLO mail.hauppauge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758886AbZCaNXQ (ORCPT ); Tue, 31 Mar 2009 09:23:16 -0400 Received: from 74.73.53.120 [74.73.53.120] by mail.hauppauge.com with XWall v3.41e ; Tue, 31 Mar 2009 09:16:18 -0400 Message-ID: <49D21938.3000907@linuxtv.org> Date: Tue, 31 Mar 2009 09:23:04 -0400 From: Michael Krufky User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 To: stable@kernel.org CC: Linux Media Mailing List , Hans Verkuil Subject: [2.6.29.y PATCH] V4L: v4l2-common: remove incorrect MODULE test Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From ba6b8068cf8f428f296762146cef6aafc4686f81 Mon Sep 17 00:00:00 2001 From: Hans Verkuil 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 Thanks-to: Mark Lord Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Michael Krufky (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