Re: [patch] acpi compile fix

Andrew Morton (akpm@digeo.com)
Fri, 4 Apr 2003 11:57:56 -0800


Dave Jones <davej@codemonkey.org.uk> wrote:
>
> On Thu, Apr 03, 2003 at 01:05:05PM -0800, Andrew Morton wrote:
>
> > diff -puN drivers/acpi/osl.c~acpi-spinlock-casts drivers/acpi/osl.c
> > --- 25/drivers/acpi/osl.c~acpi-spinlock-casts Thu Apr 3 13:00:54 2003
> > +++ 25-akpm/drivers/acpi/osl.c Thu Apr 3 13:01:25 2003
> > @@ -736,7 +736,7 @@ acpi_os_acquire_lock (
> > if (flags & ACPI_NOT_ISR)
> > ACPI_DISABLE_IRQS();
> >
> > - spin_lock(handle);
> > + spin_lock((spinlock_t *)handle);
>
> Is there a reason these functions can't just have their arguments
> changed to take a spinlock_t* instead of an acpi_handle ?
> That cast looks really fugly IMO.
>

I think acpi_handle_t is "an opaque type specific to the OS on which the APCI
code happens to be running".

It is presently `void *', implicitly pointing at a spinlock_t.

If the above guesses (I'd prefer not to look) are correct then

struct acpi_handle_t {
spinlock_t lock;
};

would make a ton more sense.

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