Subject: Re: [PATCH] dmasound_pmac depends on pmac specific config options

From: Brad Boyer <[email-masked]>
Date: Sat, 22 Oct 2005 16:03:43 -0700

On Sat, Oct 22, 2005 at 11:19:06PM +0200, Olaf Hering wrote:
>  On Sat, Oct 22, Brad Boyer wrote:
> 
> > I disagree. I think a much better solution would be to change the
> > code to be conditionalized internally on PMU support, rather than
> > having #ifdef CONFIG_PM since the functions being called inside
> > that protection are actually out of the PMU code, not the generic
> > power management system. By doing this, you could for example
> > have a kernel compiled for a 1st gen PCI PowerMac without any
> > extra drivers. In this case, you have CUDA and AWACS, but there
> > is no PMU support and no need for sleep notifiers.
> 
> May patch would allow that, you need either CUDA or PMU support.

The problem is not that you need CUDA or PMU support. The real
problem is that if you have CONFIG_PM set and do not have
CONFIG_ADB_PMU set, the pmac sound drivers don't compile because
they have calls into the pmu code protected by #ifdef CONFIG_PM,
which isn't enough to ensure that those symbols actually exist.
That code gets into the kernel only if you have CONFIG_PM and
CONFIG_ADB_PMU both set. Your patch will still fail in the
following case:

CONFIG_PM set
CONFIG_CUDA set
CONFIG_ADB_PMU not set

If you enable either of the pmac sound drivers with this setup,
it will fail to compile with exactly the same error.

	Brad Boyer
	[email-masked]