From patchwork Fri Feb 28 23:41:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dylan Reid X-Patchwork-Id: 3745441 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 9B04F9F35F for ; Fri, 28 Feb 2014 23:48:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D1006202AE for ; Fri, 28 Feb 2014 23:48:32 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id B678B201BA for ; Fri, 28 Feb 2014 23:48:31 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id C41FF265E23; Sat, 1 Mar 2014 00:48:30 +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,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 58B61265A72; Sat, 1 Mar 2014 00:43:15 +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 2720E2659B2; Sat, 1 Mar 2014 00:43:13 +0100 (CET) Received: from mail-yk0-f201.google.com (mail-yk0-f201.google.com [209.85.160.201]) by alsa0.perex.cz (Postfix) with ESMTP id A812B2659BA for ; Sat, 1 Mar 2014 00:42:52 +0100 (CET) Received: by mail-yk0-f201.google.com with SMTP id 142so521993ykq.0 for ; Fri, 28 Feb 2014 15:42:51 -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=jcrvmRLFUNUs9BNW1RARzT4QAFSFeaCxzYiFqeU44WRHjCMfXyyy7BExWcdXRvVU/K R/+zoV4w84OW0SJO8XQ2WvQwtIr5MYfBUcPuMiOa8Ll7OVge/wkEEysOa8gTlSEQjOwW ordgD1Fkl/WCtM3Ly/LYdUsfWHr0tFgk/rDxLdbPBz/7paTsIVGmXa0NjmX7qQ6aj1mN 1XJdoSIZYi7ROJbS+quZaqtOsDBXG53ixtt7p8sY2+FLervbOQSxAGNWjScxDJWFEa7d 4AO2jpO6wixPwEXvLT0EyvNdK5IE6PpLOq9pizQaqpanjzIAx21q2i+ci9n2YRc6yKhl gu8Q== X-Gm-Message-State: ALoCoQkJIuqBEJHfD5uf5be/+zsde8UaW1M6ywr2lg0fvtYHU1oWSB+RfemfNiYKcU7YVSUCAoGqAeEQwTslVFAVT2qCgKPQGU7duoQsjd05yF1BVITyBt4jq20qJEZqgklfxl95ghPyXf3wLjs2QYrvM1CfMFkVRIf0pZz0fqkSN35wNSm3eTVBImwQuzyQkIiq/l2Qd2e7i9nHkuN+SrQhfk4Jr97m2V7obAKr+HkBgKH4m3EdqvM= X-Received: by 10.236.90.200 with SMTP id e48mr2378382yhf.28.1393630971760; Fri, 28 Feb 2014 15:42:51 -0800 (PST) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id k45si543996yhn.4.2014.02.28.15.42.51 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Feb 2014 15:42:51 -0800 (PST) Received: from hojo20.mtv.corp.google.com (hojo20.mtv.corp.google.com [172.22.72.28]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 9833C31C1DD; Fri, 28 Feb 2014 15:42:51 -0800 (PST) Received: by hojo20.mtv.corp.google.com (Postfix, from userid 123195) id 70142180D8D; Fri, 28 Feb 2014 15:42:51 -0800 (PST) From: Dylan Reid To: alsa-devel@alsa-project.org Date: Fri, 28 Feb 2014 15:41:31 -0800 Message-Id: <1393630893-29010-21-git-send-email-dgreid@chromium.org> X-Mailer: git-send-email 1.8.1.3.605.g02339dd In-Reply-To: <1393630893-29010-1-git-send-email-dgreid@chromium.org> References: <1393630893-29010-1-git-send-email-dgreid@chromium.org> Cc: tiwai@suse.de, Dylan Reid , swarren@wwwdotorg.org Subject: [alsa-devel] [RFCv2 20/22] 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 */