On Tue, 29 Jun 2010, Robert P. J. Day wrote:
... snip ...
> the question -- is it reasonable to assume that *all* PCI drivers
> should conditionally protect their suspend/resume code with a test
> of CONFIG_PM similar to the above? that is, are there any
> circumstances where you would define a PCI driver with suspend and
> resume capability when CONFIG_PM is *not* configured? since i'm
> sure i saw an example of that the other day, i just can't remember
> where.
actually, it's easy to find such examples, i restricted myself to
the drivers/net directory and ran the command:
$ grep -L CONFIG_PM $(grep -l '\.suspend' $(grep -l pci_driver *))
amd8111e.c
b44.c
bnx2.c
bnx2x_main.c
niu.c
ns83820.c
pcnet32.c
sc92031.c
tg3.c
$
so tg3.c is a perfect example:
...
static struct pci_driver tg3_driver = {
.name = DRV_MODULE_NAME,
.id_table = tg3_pci_tbl,
.probe = tg3_init_one,
.remove = __devexit_p(tg3_remove_one),
.suspend = tg3_suspend,
.resume = tg3_resume
};
...
so, again, does the above make any sense if CONFIG_PM is not
selected during configuration? or perhaps i just don't understand PM,
suspend and resume well enough.
rday
--
========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA
Top-notch, inexpensive online Linux/OSS/kernel courses
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ