From patchwork Thu Aug 16 14:55:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nurkin X-Patchwork-Id: 1333161 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 67C8BDFB34 for ; Thu, 16 Aug 2012 14:55:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756861Ab2HPOzh (ORCPT ); Thu, 16 Aug 2012 10:55:37 -0400 Received: from imap.netup.ru ([77.72.80.15]:57397 "EHLO imap.netup.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753804Ab2HPOze (ORCPT ); Thu, 16 Aug 2012 10:55:34 -0400 Received: from [10.1.4.171] (team.netup.ru [77.72.80.1]) by imap.netup.ru (Postfix) with ESMTPS id 07E896445EE; Thu, 16 Aug 2012 18:55:27 +0400 (MSK) Message-ID: <502D09EC.9080504@netup.ru> Date: Thu, 16 Aug 2012 18:55:40 +0400 From: ptqa Organization: Netup User-Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: Mauro Carvalho Chehab , Linux-Media CC: =?UTF-8?B?0JDQu9C10LrRgdC10Lkg0JHRg9GC0LrQtdC10LI=?= , Abylai Ospan Subject: [PATCH] cx23885: fix pointer to structure for CAM Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hello, Mauro. Please, check our patch. Fixes problem with CAM, when after re-iinitialization CAM used old pointer to structure. Signed-off-by: Anton Nurkin --- drivers/media/pci/cx23885/altera-ci.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) inter = kzalloc(sizeof(struct fpga_internal), GFP_KERNEL); @@ -743,7 +744,6 @@ int altera_ci_init(struct altera_ci_config *config, int ci_nr) ci_dbg_print("%s: setting state = %p for ci = %d\n", __func__, state, ci_nr - 1); - inter->state[ci_nr - 1] = state; state->internal = inter; state->nr = ci_nr - 1; @@ -765,6 +765,8 @@ int altera_ci_init(struct altera_ci_config *config, int ci_nr) if (0 != ret) goto err; + inter->state[ci_nr - 1] = state; + altera_hw_filt_init(config, ci_nr); if (inter->strt_wrk) { -- 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 --git a/drivers/media/pci/cx23885/altera-ci.c b/drivers/media/pci/cx23885/altera-ci.c index 1fa8927..1e73764 100644 --- a/drivers/media/pci/cx23885/altera-ci.c +++ b/drivers/media/pci/cx23885/altera-ci.c @@ -724,6 +724,7 @@ int altera_ci_init(struct altera_ci_config *config, int ci_nr) if (temp_int != NULL) { inter = temp_int->internal; (inter->cis_used)++; + inter->fpga_rw = config->fpga_rw; ci_dbg_print("%s: Find Internal Structure!\n", __func__); } else {