From: Takashi Iwai Subject: Re: [PATCH 1/3] ALSA: hda - Remove dependency on bus->pci in hda_beep.c Date: Sat, 15 Feb 2014 10:22:53 +0100 Message-ID: References: <1392455855-10594-1-git-send-email-tiwai@suse.de> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 79E7D2615F3 for ; Sat, 15 Feb 2014 10:22:53 +0100 (CET) In-Reply-To: <1392455855-10594-1-git-send-email-tiwai@suse.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: alsa-devel@alsa-project.org Cc: Dylan Reid , Stephen Warren List-Id: alsa-devel@alsa-project.org At Sat, 15 Feb 2014 10:17:33 +0100, Takashi Iwai wrote: > > 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 I forgot the cover page: these tree patches are trivial cleanups of hda-codec drivers (not the controller) to work without PCI device assignment. The idea was triggered by Dylan's question. Takashi > --- > 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); > -- > 1.8.5.2 > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel >