Re: Resume enhancement: restore pci config space

From: Takashi Iwai
Date: Tue Jun 01 2004 - 11:32:56 EST


At Tue, 1 Jun 2004 18:02:34 +0200,
Pavel Machek wrote:
>
> [It seems to me like ALSA can't easily put NULL into suspend/resume
> fields, because they have additional layer of abstraction between them
> and kernel.]

It does indeed. ALSA provides the "common" PCI suspend/resume
callbacks, which call the internal suspend/resume callbacks.
It's for handling the power status from the external program, too.

These are defined as SND_PCI_PM_CALLBACKS. If CONFIG_PM is not set,
it's expanded to empty. So, typically the code looks like the
following:

static struct pci_driver driver = {
.name = "Intel ICH",
.id_table = snd_intel8x0_ids,
.probe = snd_intel8x0_probe,
.remove = __devexit_p(snd_intel8x0_remove),
SND_PCI_PM_CALLBACKS
};


Takashi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/