From patchwork Tue Sep 23 11:00:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 4955441 X-Patchwork-Delegate: tiwai@suse.de Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 118989F2BB for ; Tue, 23 Sep 2014 11:01:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B98E820259 for ; Tue, 23 Sep 2014 11:01:37 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 9F728201CE for ; Tue, 23 Sep 2014 11:01:35 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3C8B72651C9; Tue, 23 Sep 2014 13:01:32 +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 5828A26508D; Tue, 23 Sep 2014 13:01:13 +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 9F8C3265062; Tue, 23 Sep 2014 13:01:11 +0200 (CEST) Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by alsa0.perex.cz (Postfix) with ESMTP id 41C60264F47 for ; Tue, 23 Sep 2014 13:01:03 +0200 (CEST) Received: by mail-pa0-f44.google.com with SMTP id eu11so5347887pac.17 for ; Tue, 23 Sep 2014 04:01:01 -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=Jfx/9/XdRnG/ypRpNUVcvARs22hFyHUf8+IeXqA+MXQ=; b=RPrq5YVSf6HWi9eTzhjaxsbJiNvbSW7tujX2OaMIT1pdyunma781hD8SkMfX5llHbF V0nuEz0WQKZnJr3Wdg77ZfdA+DFy87GmKiKfSWqygBnyNQeEIT97bVjSdmCuW4qyXMQe VGss59LEAjXUe5eR2ArcZntBtThvQJJsz8c0TZzYmw38RjnBp2JArrI0Nxmmvb6TYH3d edvWjeDTlkm92SqeJEmOVbzIXp1ZfS8m0/a0BpgDMhFdzx41QWcgBdytqKxPu4KcXIR5 S8SNSNAIXFA3Q2HlW0+KD28iD6qCx5yykNgVk5uWdttX0+omNUZ1w3OFZggx5N9KRS+y 96sw== X-Received: by 10.70.88.163 with SMTP id bh3mr40535055pdb.52.1411470060733; Tue, 23 Sep 2014 04:01:00 -0700 (PDT) Received: from localhost.localdomain ([122.169.152.214]) by mx.google.com with ESMTPSA id zn2sm11757781pbb.41.2014.09.23.04.00.58 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Sep 2014 04:01:00 -0700 (PDT) From: Sudip Mukherjee To: Jaroslav Kysela , Takashi Iwai Date: Tue, 23 Sep 2014 16:30:20 +0530 Message-Id: <1411470024-25244-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 v4 1/5] ALSA: 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 a pointer of snd_card in some of the structures to get a reference of the card from other functions. these references of snd_card will be initialised in the next patch of this series and as of now these snd_card will be used to print the the device information when we convert the pr_* macros to dev_* in a later patch of this series. Signed-off-by: Sudip Mukherjee --- sound/pci/ctxfi/ctamixer.h | 3 +++ sound/pci/ctxfi/ctdaio.h | 2 ++ sound/pci/ctxfi/cthardware.h | 2 ++ sound/pci/ctxfi/ctsrc.h | 3 +++ 4 files changed, 10 insertions(+) diff --git a/sound/pci/ctxfi/ctamixer.h b/sound/pci/ctxfi/ctamixer.h index cc49e5a..ea81b8a 100644 --- a/sound/pci/ctxfi/ctamixer.h +++ b/sound/pci/ctxfi/ctamixer.h @@ -21,6 +21,7 @@ #include "ctresource.h" #include +#include /* Define the descriptor of a summation node resource */ struct sum { @@ -35,6 +36,7 @@ struct sum_desc { struct sum_mgr { struct rsc_mgr mgr; /* Basic resource manager info */ + struct snd_card *card; /* pointer to this card */ spinlock_t mgr_lock; /* request one sum resource */ @@ -79,6 +81,7 @@ struct amixer_desc { struct amixer_mgr { struct rsc_mgr mgr; /* Basic resource manager info */ + struct snd_card *card; /* pointer to this card */ spinlock_t mgr_lock; /* request one amixer resource */ diff --git a/sound/pci/ctxfi/ctdaio.h b/sound/pci/ctxfi/ctdaio.h index 85ccb6e..19cb285 100644 --- a/sound/pci/ctxfi/ctdaio.h +++ b/sound/pci/ctxfi/ctdaio.h @@ -23,6 +23,7 @@ #include "ctimap.h" #include #include +#include /* Define the descriptor of a daio resource */ enum DAIOTYP { @@ -98,6 +99,7 @@ struct daio_desc { struct daio_mgr { struct rsc_mgr mgr; /* Basic resource manager info */ + struct snd_card *card; /* pointer to this card */ spinlock_t mgr_lock; spinlock_t imap_lock; struct list_head imappers; 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; diff --git a/sound/pci/ctxfi/ctsrc.h b/sound/pci/ctxfi/ctsrc.h index 259366a..7887cc6 100644 --- a/sound/pci/ctxfi/ctsrc.h +++ b/sound/pci/ctxfi/ctsrc.h @@ -23,6 +23,7 @@ #include "ctimap.h" #include #include +#include #define SRC_STATE_OFF 0x0 #define SRC_STATE_INIT 0x4 @@ -85,6 +86,7 @@ struct src_desc { /* Define src manager object */ struct src_mgr { struct rsc_mgr mgr; /* Basic resource manager info */ + struct snd_card *card; /* pointer to this card */ spinlock_t mgr_lock; /* request src resource */ @@ -123,6 +125,7 @@ struct srcimp_desc { struct srcimp_mgr { struct rsc_mgr mgr; /* Basic resource manager info */ + struct snd_card *card; /* pointer to this card */ spinlock_t mgr_lock; spinlock_t imap_lock; struct list_head imappers;