https://github.com/torvalds/linux
Revision 76a16be07b209a3f507c72abe823bd3af1c8661a authored by Wang Hai on 28 July 2021, 07:43:13 UTC, committed by David S. Miller on 28 July 2021, 08:26:49 UTC
Replace pci_enable_device() with pcim_enable_device(),
pci_disable_device() and pci_release_regions() will be
called in release automatically.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 557fb58
Raw File
Tip revision: 76a16be07b209a3f507c72abe823bd3af1c8661a authored by Wang Hai on 28 July 2021, 07:43:13 UTC
tulip: windbond-840: Fix missing pci_disable_device() in probe and remove
Tip revision: 76a16be
last.c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  Advanced Linux Sound Architecture
 *  Copyright (c) by Jaroslav Kysela <perex@perex.cz>
 */

#include <linux/init.h>
#include <sound/core.h>

static int __init alsa_sound_last_init(void)
{
	struct snd_card *card;
	int idx, ok = 0;
	
	printk(KERN_INFO "ALSA device list:\n");
	for (idx = 0; idx < SNDRV_CARDS; idx++) {
		card = snd_card_ref(idx);
		if (card) {
			printk(KERN_INFO "  #%i: %s\n", idx, card->longname);
			snd_card_unref(card);
			ok++;
		}
	}
	if (ok == 0)
		printk(KERN_INFO "  No soundcards found.\n");
	return 0;
}

late_initcall_sync(alsa_sound_last_init);
back to top