From patchwork Sat Feb 15 09:17:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 3655841 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 DA0609F334 for ; Sat, 15 Feb 2014 09:18:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2576B201DC for ; Sat, 15 Feb 2014 09:18:50 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 31EFB2015E for ; Sat, 15 Feb 2014 09:18:49 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 204F52654C4; Sat, 15 Feb 2014 10:18:48 +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 F00C9261A40; Sat, 15 Feb 2014 10:17:46 +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 90B2E2619E5; Sat, 15 Feb 2014 10:17:44 +0100 (CET) Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 556872615F3 for ; Sat, 15 Feb 2014 10:17:36 +0100 (CET) Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id D3668ABB2 for ; Sat, 15 Feb 2014 09:17:35 +0000 (UTC) From: Takashi Iwai To: alsa-devel@alsa-project.org Date: Sat, 15 Feb 2014 10:17:33 +0100 Message-Id: <1392455855-10594-1-git-send-email-tiwai@suse.de> X-Mailer: git-send-email 1.8.5.2 Subject: [alsa-devel] [PATCH 1/3] ALSA: hda - Remove dependency on bus->pci in hda_beep.c 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 default parent device can be obtained directly via card object, so we don't need to rely on pci->dev.parent. Since there is no access to pci_dev, we can reduce the inclusion of linux/pci.h, too. Signed-off-by: Takashi Iwai Reviewed-by: Stephen Warren --- sound/pci/hda/hda_beep.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/pci/hda/hda_beep.c b/sound/pci/hda/hda_beep.c index 0589b39cda6e..d8c437a94559 100644 --- a/sound/pci/hda/hda_beep.c +++ b/sound/pci/hda/hda_beep.c @@ -20,7 +20,6 @@ */ #include -#include #include #include #include @@ -167,7 +166,7 @@ static int snd_hda_do_attach(struct hda_beep *beep) input_dev->evbit[0] = BIT_MASK(EV_SND); input_dev->sndbit[0] = BIT_MASK(SND_BELL) | BIT_MASK(SND_TONE); input_dev->event = snd_hda_beep_event; - input_dev->dev.parent = &codec->bus->pci->dev; + input_dev->dev.parent = codec->bus->card->dev; input_set_drvdata(input_dev, beep); err = input_register_device(input_dev);