From patchwork Mon Feb 14 21:03:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 557011 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 p1ELBhRY020001 for ; Mon, 14 Feb 2011 21:11:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752620Ab1BNVLl (ORCPT ); Mon, 14 Feb 2011 16:11:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:21349 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752507Ab1BNVLl (ORCPT ); Mon, 14 Feb 2011 16:11:41 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p1ELBf5m029342 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 14 Feb 2011 16:11:41 -0500 Received: from pedra (vpn-239-121.phx2.redhat.com [10.3.239.121]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p1EL3TGB012908 for ; Mon, 14 Feb 2011 16:11:40 -0500 Date: Mon, 14 Feb 2011 19:03:18 -0200 From: Mauro Carvalho Chehab Cc: Linux Media Mailing List Subject: [PATCH 11/14] [media] tuner-core: Don't use a static var for xc5000_cfg Message-ID: <20110214190318.423d6693@pedra> In-Reply-To: References: Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 To: unlisted-recipients:; (no To-header on input) 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.6 (demeter1.kernel.org [140.211.167.41]); Mon, 14 Feb 2011 21:11:43 +0000 (UTC) diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 70ff416..16939ca 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c @@ -66,7 +66,6 @@ module_param_string(ntsc, ntsc, sizeof(ntsc), 0644); * Static vars */ -static struct xc5000_config xc5000_cfg; static LIST_HEAD(tuner_list); /* @@ -338,9 +337,12 @@ static void set_type(struct i2c_client *c, unsigned int type, break; case TUNER_XC5000: { - xc5000_cfg.i2c_address = t->i2c->addr; - /* if_khz will be set when the digital dvb_attach() occurs */ - xc5000_cfg.if_khz = 0; + struct xc5000_config xc5000_cfg = { + .i2c_address = t->i2c->addr, + /* if_khz will be set at dvb_attach() */ + .if_khz = 0, + }; + if (!dvb_attach(xc5000_attach, &t->fe, t->i2c->adapter, &xc5000_cfg)) goto attach_failed;