From patchwork Fri Sep 24 14:14:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 204702 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8OEF4Wn010324 for ; Fri, 24 Sep 2010 14:15:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932329Ab0IXOOr (ORCPT ); Fri, 24 Sep 2010 10:14:47 -0400 Received: from perceval.irobotique.be ([92.243.18.41]:60404 "EHLO perceval.irobotique.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932321Ab0IXOOo (ORCPT ); Fri, 24 Sep 2010 10:14:44 -0400 Received: from localhost.localdomain (unknown [91.178.47.217]) by perceval.irobotique.be (Postfix) with ESMTPSA id F2A8035FF0; Fri, 24 Sep 2010 14:14:41 +0000 (UTC) From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: Hans Verkuil , Jean Delvare , Guennadi Liakhovetski , Pete Eberlein , Mike Isely , Eduardo Valentin , Andy Walls , Vaibhav Hiremath , Muralidharan Karicheri Subject: [PATCH 15/16] cx18: Don't use module names to load I2C modules Date: Fri, 24 Sep 2010 16:14:13 +0200 Message-Id: <1285337654-5044-16-git-send-email-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 1.7.2.2 In-Reply-To: <1285337654-5044-1-git-send-email-laurent.pinchart@ideasonboard.com> References: <1285337654-5044-1-git-send-email-laurent.pinchart@ideasonboard.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 24 Sep 2010 14:15:09 +0000 (UTC) diff --git a/drivers/media/video/cx18/cx18-i2c.c b/drivers/media/video/cx18/cx18-i2c.c index 809f7d3..3b67984 100644 --- a/drivers/media/video/cx18/cx18-i2c.c +++ b/drivers/media/video/cx18/cx18-i2c.c @@ -71,19 +71,6 @@ static const u8 hw_bus[] = { }; /* This array should match the CX18_HW_ defines */ -static const char * const hw_modules[] = { - "tuner", /* CX18_HW_TUNER */ - NULL, /* CX18_HW_TVEEPROM */ - "cs5345", /* CX18_HW_CS5345 */ - NULL, /* CX18_HW_DVB */ - NULL, /* CX18_HW_418_AV */ - NULL, /* CX18_HW_GPIO_MUX */ - NULL, /* CX18_HW_GPIO_RESET_CTRL */ - NULL, /* CX18_HW_Z8F0811_IR_TX_HAUP */ - NULL, /* CX18_HW_Z8F0811_IR_RX_HAUP */ -}; - -/* This array should match the CX18_HW_ defines */ static const char * const hw_devicenames[] = { "tuner", "tveeprom", @@ -125,7 +112,6 @@ int cx18_i2c_register(struct cx18 *cx, unsigned idx) struct v4l2_subdev *sd; int bus = hw_bus[idx]; struct i2c_adapter *adap = &cx->i2c_adap[bus]; - const char *mod = hw_modules[idx]; const char *type = hw_devicenames[idx]; u32 hw = 1 << idx; @@ -135,15 +121,15 @@ int cx18_i2c_register(struct cx18 *cx, unsigned idx) if (hw == CX18_HW_TUNER) { /* special tuner group handling */ sd = v4l2_i2c_new_subdev(&cx->v4l2_dev, - adap, mod, type, 0, cx->card_i2c->radio); + adap, NULL, type, 0, cx->card_i2c->radio); if (sd != NULL) sd->grp_id = hw; sd = v4l2_i2c_new_subdev(&cx->v4l2_dev, - adap, mod, type, 0, cx->card_i2c->demod); + adap, NULL, type, 0, cx->card_i2c->demod); if (sd != NULL) sd->grp_id = hw; sd = v4l2_i2c_new_subdev(&cx->v4l2_dev, - adap, mod, type, 0, cx->card_i2c->tv); + adap, NULL, type, 0, cx->card_i2c->tv); if (sd != NULL) sd->grp_id = hw; return sd != NULL ? 0 : -1; @@ -157,7 +143,8 @@ int cx18_i2c_register(struct cx18 *cx, unsigned idx) return -1; /* It's an I2C device other than an analog tuner or IR chip */ - sd = v4l2_i2c_new_subdev(&cx->v4l2_dev, adap, mod, type, hw_addrs[idx], NULL); + sd = v4l2_i2c_new_subdev(&cx->v4l2_dev, adap, NULL, type, hw_addrs[idx], + NULL); if (sd != NULL) sd->grp_id = hw; return sd != NULL ? 0 : -1;