From patchwork Sun Sep 21 16:03:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 4943981 X-Patchwork-Delegate: tiwai@suse.de Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3806DBEEA5 for ; Sun, 21 Sep 2014 16:04:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6CC402021B for ; Sun, 21 Sep 2014 16:04:20 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 9C6EA201FA for ; Sun, 21 Sep 2014 16:04:18 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1776526524F; Sun, 21 Sep 2014 18:04:16 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 91D5F261A9A; Sun, 21 Sep 2014 18:04:05 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 61C92261A9A; Sun, 21 Sep 2014 18:04:04 +0200 (CEST) Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by alsa0.perex.cz (Postfix) with ESMTP id 33F62261A60 for ; Sun, 21 Sep 2014 18:03:57 +0200 (CEST) Received: by mail-pa0-f45.google.com with SMTP id lj1so2264708pab.18 for ; Sun, 21 Sep 2014 09:03:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=OOLWuCh8aYLurSeSfPWMfOzOUK6E0UaQCjDEFE371wM=; b=mZnrUE2hfIOXgIvzz+P2ypv/2dnKXXPt2IxLRR4XEjvxKB9RvKnwd8peWet3qmgaXV g53E1/z5tGia7EIlm+69xFbp/BHtJKt99pHj0qOPBrGObopaFxMaww0LHWQ/W49L5mwx cV86F4aToVEzwAopaUVsei+QHXp4eudDqUrQHlNN0KkF3q+PEI2Seyhg5lXjykmHSK9i tylLrLfWfPzSItCVyv7bxABPxm+KnHyuDCfYfOOy3IcFZEnBpntHVykM5NHC1sxA3zKs muFG4WkqQC/KnC74o6o+6LnkM6NQ7CLlXoZON31+VsdIvpbyVpMI7LOQYiiy4qM6v73i BBAQ== X-Received: by 10.70.38.68 with SMTP id e4mr3505594pdk.159.1411315435224; Sun, 21 Sep 2014 09:03:55 -0700 (PDT) Received: from localhost.localdomain ([122.169.152.214]) by mx.google.com with ESMTPSA id nl2sm7053380pdb.83.2014.09.21.09.03.52 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 21 Sep 2014 09:03:54 -0700 (PDT) From: Sudip Mukherjee To: Jaroslav Kysela , Takashi Iwai Date: Sun, 21 Sep 2014 21:33:37 +0530 Message-Id: <1411315421-24138-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.8.1.2 Cc: alsa-devel@alsa-project.org, Sudip Mukherjee , linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH v3 1/5] sound: pci: ctxfi: added reference of snd_card X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP added and initialized a pointer of snd_card in the struct hw to get a reference of the card in other functions Signed-off-by: Sudip Mukherjee --- sound/pci/ctxfi/ctatc.c | 1 + sound/pci/ctxfi/cthardware.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c index d92a08c..b21eda4 100644 --- a/sound/pci/ctxfi/ctatc.c +++ b/sound/pci/ctxfi/ctatc.c @@ -1333,6 +1333,7 @@ static int atc_create_hw_devs(struct ct_atc *atc) pr_err("Failed to create hw obj!!!\n"); return err; } + hw->card = atc->card; atc->hw = hw; /* Initialize card hardware. */ diff --git a/sound/pci/ctxfi/cthardware.h b/sound/pci/ctxfi/cthardware.h index 5977e9a..940bbd0 100644 --- a/sound/pci/ctxfi/cthardware.h +++ b/sound/pci/ctxfi/cthardware.h @@ -20,6 +20,7 @@ #include #include +#include enum CHIPTYP { ATC20K1, @@ -184,6 +185,7 @@ struct hw { void *irq_callback_data; struct pci_dev *pci; /* the pci kernel structure of this card */ + struct snd_card *card; /* pointer to this card */ int irq; unsigned long io_base; unsigned long mem_base;