| From: Greg KH<[EMAIL PROTECTED]>
|
| ...
| > >
| > > Would it help to add a flag somewhere in struct device (or struct
| > > dev_pm_info) for indicating that the device is not cognizant of PM? For
| > > instance, all those USB endpoint pseudo-devices we create -- it's a waste
| > > of time to try doing power management on them and it generates a bunch of
| > > useless and distracting warning messages in the system log.
| >
| > Yes. In fact we should just make it a "has pm" type flag, as the
| > majority of devices do not.
| >
| > So, what kind of devices do support these files? I can think of:
| > PCI
| > USB
| > and that's it right now. Do platform devices really use those files?
|
| Something as simple as this patch perhaps?
|
| thanks,
|
| greg k-h
|
| ---
| drivers/base/power/sysfs.c | 7 +++++--
| drivers/pci/probe.c | 1 +
| include/linux/device.h | 1 +
| 3 files changed, 7 insertions(+), 2 deletions(-)
|
| --- gregkh-2.6.orig/drivers/base/power/sysfs.c
| +++ gregkh-2.6/drivers/base/power/sysfs.c
| @@ -156,10 +156,13 @@ static struct attribute_group pm_attr_gr
|
| int dpm_sysfs_add(struct device * dev)
| {
| - return sysfs_create_group(&dev->kobj, &pm_attr_group);
| + if (dev->supports_power)
| + return sysfs_create_group(&dev->kobj, &pm_attr_group);
| + return 0;
| }
| ...
---
Hmm - could you make it "dev->pm_aware" or "dev->supports_pm" rather
than "supports_power"?
thanks,
scott
--
scott preece
motorola mobile devices, il67, 1800 s. oak st., champaign, il 61820
e-mail: [EMAIL PROTECTED] fax: +1-217-384-8550
phone: +1-217-384-8589 cell: +1-217-433-6114 pager: [EMAIL PROTECTED]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel