Re: [linux-pm] [patch 2.6.21-git] pci_choose_state() works, does ACPI magic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 14 May 2007, Pavel Machek wrote:
> > --- g26.orig/drivers/acpi/sleep/main.c	2007-05-09 08:57:37.000000000 -0700
> > +++ g26/drivers/acpi/sleep/main.c	2007-05-09 08:58:33.000000000 -0700
> > @@ -35,6 +35,20 @@ static u32 acpi_suspend_states[] = {
> >  
> >  static int init_8259A_after_S1;
> >  
> > +static u8 acpi_target_sleep_state = ACPI_STATE_S0;
> > +
> > +/**
> > + *	acpi_get_target_sleep_state - return target ACPI S-state
> > + *
> > + *	When used during suspend processing, this returns the target state
> > + *	such as ACPI_STATE_S3.  Otherwise it returns ACPI_STATE_S0.
> > + */
> > +int acpi_get_target_sleep_state(void)
> > +{
> > +	return acpi_target_sleep_state;
> > +}
> > +/* EXPORT_SYMBOL(acpi_get_target_sleep_state); ... if you need it */
> > +
> >  /**
> >   *	acpi_pm_prepare - Do preliminary suspend work.
> >   *	@pm_state:		suspend state we're entering.
> 
> This is quite an ugly hack, right? Is it really neccessary to use
> global variable for this?

It's not a global variable; observe the "static", and the way it
has an accessor.  It does expose global state however.

- Dave
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux