From: Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org>
To: Len Brown <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: ACPI Developers
<acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
Andrew Morton <akpm-3NddpPZAyC0@public.gmane.org>
Subject: Re: updated ACPI patch against 2.6.13-rc1
Date: Sun, 3 Jul 2005 23:26:01 +0200 [thread overview]
Message-ID: <20050703212601.GA4210@elf.ucw.cz> (raw)
In-Reply-To: <1120424381.28075.21.camel-jRzH0JztI1Dyk6epdUfNT+TW4wlIGRCZ@public.gmane.org>
Hi!
> > > This patch includes all the dusty patches that have been
> > > waiting in BK me for 2.6.13 to open.
> > > It applies against 2.6.13-rc1.
> > >
> > >
> > ftp://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/release/2.6.13/acpi-20050408-2.6.13-rc1.diff.gz
> > >
> > > Please give it a go, and if nothing explodes I'll git it to Linus
> > for
> > > 2.6.13-rc2 and we'll move onto the batch that is waiting in line
> > behind
> > > this one:-)
> >
> >
> > > drivers/pci/pci.c | 18
> >
> > Does it still do ugly stuff with placing pci_power_t into u32?
>
> pci/pci.c doesn't manipulate pci_power_t -- just passes it along.
>
> drivers/pci/pci-acpi.c uses it as an index to convert it into
> and acpi_state:
Aha, so it is better than I remembered.
> +static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t
> state)
> +{
> + acpi_handle handle = DEVICE_ACPI_HANDLE(&dev->dev);
> + static int state_conv[] = {
> + [0] = 0,
> + [1] = 1,
> + [2] = 2,
> + [3] = 3,
> + [4] = 3
> + };
> + int acpi_state = state_conv[(int __force) state];
Could we get rid of the __force, and use PCI_* constants above?
Also we probably need acpi_power_t, or great confusion is almost
guaranteed.
> + if (!handle)
> + return -ENODEV;
> + return acpi_bus_set_power(handle, acpi_state);
> +}
Pavel
--
teflon -- maybe it is a trademark, but it should not be.
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
prev parent reply other threads:[~2005-07-03 21:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-30 16:16 updated ACPI patch against 2.6.13-rc1 Len Brown
[not found] ` <1120148192.23586.15.camel-jRzH0JztI1Dyk6epdUfNT+TW4wlIGRCZ@public.gmane.org>
2005-07-03 20:17 ` Pavel Machek
[not found] ` <20050703201706.GB27204-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2005-07-03 20:59 ` Len Brown
[not found] ` <1120424381.28075.21.camel-jRzH0JztI1Dyk6epdUfNT+TW4wlIGRCZ@public.gmane.org>
2005-07-03 21:26 ` Pavel Machek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050703212601.GA4210@elf.ucw.cz \
--to=pavel-+zi9xunit7i@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=akpm-3NddpPZAyC0@public.gmane.org \
--cc=len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox