From patchwork Thu May 14 23:53:50 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Walls X-Patchwork-Id: 1064 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Thu, 14 May 2009 23:53:25 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra.chehab.org with IMAP (fetchmail-6.3.6) for (single-drop); Thu, 14 May 2009 21:14:24 -0300 (BRT) Received: from vger.kernel.org ([209.132.176.167]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1M4kjt-0002kM-MK; Thu, 14 May 2009 23:53:25 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753332AbZENXxW (ORCPT + 1 other); Thu, 14 May 2009 19:53:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754344AbZENXxW (ORCPT ); Thu, 14 May 2009 19:53:22 -0400 Received: from mail1.radix.net ([207.192.128.31]:53694 "EHLO mail1.radix.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753332AbZENXxV (ORCPT ); Thu, 14 May 2009 19:53:21 -0400 Received: from [192.168.1.2] (02-089.155.popsite.net [66.217.132.89]) (authenticated bits=0) by mail1.radix.net (8.13.4/8.13.4) with ESMTP id n4ENrA8c006388; Thu, 14 May 2009 19:53:11 -0400 (EDT) Subject: Re: v4l-dvb rev 11757 broke building under Ubuntu Hardy From: Andy Walls To: david.ward@gatech.edu Cc: Chaithrika U S , linux-media@vger.kernel.org Date: Thu, 14 May 2009 19:53:50 -0400 Message-Id: <1242345230.3169.49.camel@palomino.walls.org> Mime-Version: 1.0 X-Mailer: Evolution 2.24.5 (2.24.5-1.fc10) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org David Ward wrote: > I am using v4l-dvb in order to add the cx18 driver under Ubuntu Hardy > (8.04). > > The build is currently broken under Hardy, which uses kernel 2.6.24. I > have traced the origin of the problem to revision 11757. As seen in > the latest cron job output, the build produces the error when trying > to compile adv7343.c: > > /usr/local/src/v4l-dvb/v4l/adv7343.c:506: error: array type has incomplete element type > /usr/local/src/v4l-dvb/v4l/adv7343.c:518: warning: initialization from incompatible pointer type > /usr/local/src/v4l-dvb/v4l/adv7343.c:520: error: unknown field 'id_table' specified in initializer > > Thanks for resolving this. > > David Ward David, Please try the patch below. Chaithrika, Please review (and test if it is OK) the patch below. It modifies adv7343.c to what the cs5345.c file does for backward compatability. It adds some checks against kernel version, which would not go into the actual kernel, and changes some code to use the v4l2 i2c module template from v4l2-i2c-drv.h, which *would* go into the actual kenrel. Regards, Andy Signed-off-by: Andy Walls --- 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 -r 0018ed9bbca3 linux/drivers/media/video/adv7343.c --- a/linux/drivers/media/video/adv7343.c Tue May 12 16:13:13 2009 +0000 +++ b/linux/drivers/media/video/adv7343.c Thu May 14 19:51:10 2009 -0400 @@ -29,6 +29,8 @@ #include #include #include +#include +#include "compat.h" #include "adv7343_regs.h" @@ -503,6 +505,7 @@ return 0; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) static const struct i2c_device_id adv7343_id[] = { {"adv7343", 0}, {}, @@ -510,25 +513,12 @@ MODULE_DEVICE_TABLE(i2c, adv7343_id); -static struct i2c_driver adv7343_driver = { - .driver = { - .owner = THIS_MODULE, - .name = "adv7343", - }, +#endif +static struct v4l2_i2c_driver_data v4l2_i2c_data = { + .name = "adv7343", .probe = adv7343_probe, .remove = adv7343_remove, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) .id_table = adv7343_id, +#endif }; - -static __init int init_adv7343(void) -{ - return i2c_add_driver(&adv7343_driver); -} - -static __exit void exit_adv7343(void) -{ - i2c_del_driver(&adv7343_driver); -} - -module_init(init_adv7343); -module_exit(exit_adv7343);