From patchwork Fri Feb 28 06:36:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dylan Reid X-Patchwork-Id: 3738971 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 91D459F2ED for ; Fri, 28 Feb 2014 06:45:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C523B2026D for ; Fri, 28 Feb 2014 06:45:37 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 88DAB20266 for ; Fri, 28 Feb 2014 06:45:36 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1B1DB265B51; Fri, 28 Feb 2014 07:45:31 +0100 (CET) Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id F2729265952; Fri, 28 Feb 2014 07:38:23 +0100 (CET) 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 10A7D265930; Fri, 28 Feb 2014 07:38:16 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from mail-vc0-f202.google.com (mail-vc0-f202.google.com [209.85.220.202]) by alsa0.perex.cz (Postfix) with ESMTP id D2D982650B4 for ; Fri, 28 Feb 2014 07:37:13 +0100 (CET) Received: by mail-vc0-f202.google.com with SMTP id hu8so34210vcb.3 for ; Thu, 27 Feb 2014 22:37:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BUkee1MVGr0Md1/E+FDJWUpvp/4X9cVZhFpXbqSCPSw=; b=ljTrPc5c8WGgWqCOgXA/JZZYLFrYhbdPf1FCHnrTJ/IjcAlTxQezxfc8vBeG4sn9O/ KEa3Do8bUvTJcgHYIDWrlOTDoEx39dobmFAJUlOPyC3d/z88pkck6rZ0l92GVaMNFC3v 03tSP1lz+AQvct3TviuenriGi3z7kQ9PznQbRMEOydj8r5QRFAlNrKzMNsgGyEsys5ck oa8MrZXdwr1JkjrR939yo72QN2deqhdzzRsVphmslRnS+raCu+lsgp1T+DzUiL0A8b2r dFRNhEhSZw1IFvmISvGFcwoZsJfXIU3YVz1I/xIF70UsCBRu11O8hfWvERi7cYUUnc6U xUWw== X-Gm-Message-State: ALoCoQmwh5x5SufBNbU0vPm9HL4yQJ93uZ2J5cZtJz8PW8nKLogsBAaAvXGEgXpZnWoOZw5JkUYNNi6pnAUKhAO2JLhIpeQF+eWlKPvHC0z+4Jxl4T36Jtiv0OesKv5WNRWYPAFdBL+RtD7T+eOXfq9N0LCeZP0P3EbJspsV/bLbY1LiqBE6pshIqPHl0RwSiSL9yINA+JA3lXgm9hznF/aNBgXU6gt9+1wdtRha8V6lwFO4qsJ+Bbk= X-Received: by 10.58.231.201 with SMTP id ti9mr458668vec.5.1393569432773; Thu, 27 Feb 2014 22:37:12 -0800 (PST) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id u4si113623yhb.5.2014.02.27.22.37.12 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 27 Feb 2014 22:37:12 -0800 (PST) Received: from hojo20.mtv.corp.google.com (hojo20.mtv.corp.google.com [172.22.72.28]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id 9A4C55A4323; Thu, 27 Feb 2014 22:37:12 -0800 (PST) Received: by hojo20.mtv.corp.google.com (Postfix, from userid 123195) id 70A9A181DE7; Thu, 27 Feb 2014 22:37:12 -0800 (PST) From: Dylan Reid To: alsa-devel@alsa-project.org Date: Thu, 27 Feb 2014 22:36:00 -0800 Message-Id: <1393569362-27285-18-git-send-email-dgreid@chromium.org> X-Mailer: git-send-email 1.8.1.3.605.g02339dd In-Reply-To: <1393569362-27285-1-git-send-email-dgreid@chromium.org> References: <1393569362-27285-1-git-send-email-dgreid@chromium.org> Cc: tiwai@suse.de, Dylan Reid , swarren@wwwdotorg.org Subject: [alsa-devel] [RFC 17/19] ALSA: core - Define snd_pci_quirk without CONFIG_PCI 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 The hda codecs all use this struct and, with an HDA platform driver, will be able to be built without PCI. Signed-off-by: Dylan Reid --- include/sound/core.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/include/sound/core.h b/include/sound/core.h index aac9a85..d3f5f81 100644 --- a/include/sound/core.h +++ b/include/sound/core.h @@ -433,7 +433,6 @@ static inline void snd_printdd(const char *format, ...) {} #define gameport_get_port_data(gp) (gp)->port_data #endif -#ifdef CONFIG_PCI /* PCI quirk list helper */ struct snd_pci_quirk { unsigned short subvendor; /* PCI subvendor ID */ @@ -469,12 +468,26 @@ struct snd_pci_quirk { #define snd_pci_quirk_name(q) "" #endif +#ifdef CONFIG_PCI const struct snd_pci_quirk * snd_pci_quirk_lookup(struct pci_dev *pci, const struct snd_pci_quirk *list); const struct snd_pci_quirk * snd_pci_quirk_lookup_id(u16 vendor, u16 device, const struct snd_pci_quirk *list); +#else +static inline const struct snd_pci_quirk * +snd_pci_quirk_lookup(struct pci_dev *pci, const struct snd_pci_quirk *list) +{ + return NULL; +} + +static inline const struct snd_pci_quirk * +snd_pci_quirk_lookup_id(u16 vendor, u16 device, + const struct snd_pci_quirk *list) +{ + return NULL; +} #endif #endif /* __SOUND_CORE_H */