From patchwork Mon Mar 30 16:35:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 15147 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 n2UGa7TH016962 for ; Mon, 30 Mar 2009 16:36:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750873AbZC3QgH (ORCPT ); Mon, 30 Mar 2009 12:36:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751686AbZC3QgH (ORCPT ); Mon, 30 Mar 2009 12:36:07 -0400 Received: from smtp-vbr10.xs4all.nl ([194.109.24.30]:2352 "EHLO smtp-vbr10.xs4all.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750873AbZC3QgG (ORCPT ); Mon, 30 Mar 2009 12:36:06 -0400 Received: from tschai.lan (cm-84.208.85.194.getinternet.no [84.208.85.194]) (authenticated bits=0) by smtp-vbr10.xs4all.nl (8.13.8/8.13.8) with ESMTP id n2UGZuIP005497 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 30 Mar 2009 18:35:56 +0200 (CEST) (envelope-from hverkuil@xs4all.nl) From: Hans Verkuil To: Mike Krufky Subject: Patch for 2.6.29 stable series: remove #ifdef MODULE nonsense Date: Mon, 30 Mar 2009 18:35:54 +0200 User-Agent: KMail/1.9.9 Cc: Mark Lord , linux-media@vger.kernel.org MIME-Version: 1.0 Message-Id: <200903301835.55023.hverkuil@xs4all.nl> X-Virus-Scanned: by XS4ALL Virus Scanner Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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 --- 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));