* Fix few remaining u32 vs. pm_message_t issues
@ 2005-02-28 20:15 Pavel Machek
2005-02-28 20:52 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2005-02-28 20:15 UTC (permalink / raw)
To: Andrew Morton, kernel list
Hi!
-mm is pretty good in u32 vs. pm_message_t area, there are only few
-places missing. Some of them are in usb (and already on their way
-through greg), this should fix the rest. Only code change is
-pci_choose_state in savagefb. Please apply,
Pavel
Signed-off-by: Pavel Machek <pavel@suse.cz>
--- clean-mm/drivers/base/power/runtime.c 2005-01-12 11:07:39.000000000 +0100
+++ linux-mm/drivers/base/power/runtime.c 2005-02-28 21:05:15.000000000 +0100
@@ -16,7 +16,7 @@
if (!dev->power.power_state)
return;
if (!resume_device(dev))
- dev->power.power_state = 0;
+ dev->power.power_state = PMSG_ON;
}
--- clean-mm/drivers/base/power/sysfs.c 2004-08-15 19:14:55.000000000 +0200
+++ linux-mm/drivers/base/power/sysfs.c 2005-02-28 21:05:15.000000000 +0100
@@ -31,7 +31,7 @@
static ssize_t state_store(struct device * dev, const char * buf, size_t n)
{
- u32 state;
+ pm_message_t state;
char * rest;
int error = 0;
Only in linux-mm/drivers/char: consolemap_deftbl.c
--- clean-mm/drivers/ide/ide-disk.c 2005-02-28 01:13:56.000000000 +0100
+++ linux-mm/drivers/ide/ide-disk.c 2005-02-28 21:05:15.000000000 +0100
@@ -1098,7 +1098,7 @@
}
printk("Shutdown: %s\n", drive->name);
- dev->bus->suspend(dev, PM_SUSPEND_STANDBY);
+ dev->bus->suspend(dev, PMSG_SUSPEND);
}
/*
--- clean-mm/drivers/media/video/msp3400.c 2005-02-03 22:27:14.000000000 +0100
+++ linux-mm/drivers/media/video/msp3400.c 2005-02-28 21:05:15.000000000 +0100
@@ -1422,7 +1422,7 @@
static int msp_probe(struct i2c_adapter *adap);
static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg);
-static int msp_suspend(struct device * dev, u32 state, u32 level);
+static int msp_suspend(struct device * dev, pm_message_t state, u32 level);
static int msp_resume(struct device * dev, u32 level);
static void msp_wake_thread(struct i2c_client *client);
@@ -1830,7 +1830,7 @@
return 0;
}
-static int msp_suspend(struct device * dev, u32 state, u32 level)
+static int msp_suspend(struct device * dev, pm_message_t state, u32 level)
{
struct i2c_client *c = container_of(dev, struct i2c_client, dev);
--- clean-mm/drivers/pci/pci.c 2005-02-28 01:13:58.000000000 +0100
+++ linux-mm/drivers/pci/pci.c 2005-02-28 21:05:55.000000000 +0100
@@ -312,13 +312,14 @@
/**
* pci_choose_state - Choose the power state of a PCI device
* @dev: PCI device to be suspended
- * @state: target sleep state for the whole system
+ * @state: target sleep state for the whole system. This is the value
+ * that is passed to suspend() function.
*
* Returns PCI power state suitable for given device and given system
* message.
*/
-pci_power_t pci_choose_state(struct pci_dev *dev, u32 state)
+pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state)
{
if (!pci_find_capability(dev, PCI_CAP_ID_PM))
return PCI_D0;
--- clean-mm/drivers/video/i810/i810_main.c 2005-02-28 01:14:02.000000000 +0100
+++ linux-mm/drivers/video/i810/i810_main.c 2005-02-28 21:05:15.000000000 +0100
@@ -1492,7 +1492,7 @@
/***********************************************************************
* Power Management *
***********************************************************************/
-static int i810fb_suspend(struct pci_dev *dev, u32 state)
+static int i810fb_suspend(struct pci_dev *dev, pm_message_t state)
{
struct fb_info *info = pci_get_drvdata(dev);
struct i810fb_par *par = (struct i810fb_par *) info->par;
--- clean-mm/drivers/video/savage/savagefb.c 2005-02-28 01:14:02.000000000 +0100
+++ linux-mm/drivers/video/savage/savagefb.c 2005-02-28 21:05:15.000000000 +0100
@@ -2100,7 +2100,7 @@
}
}
-static int savagefb_suspend (struct pci_dev* dev, u32 state)
+static int savagefb_suspend (struct pci_dev* dev, pm_message_t state)
{
struct fb_info *info =
(struct fb_info *)pci_get_drvdata(dev);
@@ -2115,7 +2115,7 @@
release_console_sem();
pci_disable_device(dev);
- pci_set_power_state(dev, state);
+ pci_set_power_state(dev, pci_choose_state(dev, state));
return 0;
}
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Fix few remaining u32 vs. pm_message_t issues
2005-02-28 20:15 Fix few remaining u32 vs. pm_message_t issues Pavel Machek
@ 2005-02-28 20:52 ` Greg KH
2005-02-28 22:19 ` Pavel Machek
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2005-02-28 20:52 UTC (permalink / raw)
To: Pavel Machek; +Cc: Andrew Morton, kernel list
On Mon, Feb 28, 2005 at 09:15:36PM +0100, Pavel Machek wrote:
> Hi!
>
> -mm is pretty good in u32 vs. pm_message_t area, there are only few
> -places missing. Some of them are in usb (and already on their way
> -through greg), this should fix the rest. Only code change is
> -pci_choose_state in savagefb. Please apply,
If you split out the drivers/base/* and the drivers/pci/* ones I'll add
those to my trees too.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Fix few remaining u32 vs. pm_message_t issues
2005-02-28 20:52 ` Greg KH
@ 2005-02-28 22:19 ` Pavel Machek
0 siblings, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2005-02-28 22:19 UTC (permalink / raw)
To: Greg KH; +Cc: Andrew Morton, kernel list
Hi!
> > -mm is pretty good in u32 vs. pm_message_t area, there are only few
> > -places missing. Some of them are in usb (and already on their way
> > -through greg), this should fix the rest. Only code change is
> > -pci_choose_state in savagefb. Please apply,
>
> If you split out the drivers/base/* and the drivers/pci/* ones I'll add
> those to my trees too.
Okay, here they are:
Thanks,
Pavel
--- clean-mm/drivers/base/power/runtime.c 2005-01-12 11:07:39.000000000 +0100
+++ linux-mm/drivers/base/power/runtime.c 2005-02-28 21:05:15.000000000 +0100
@@ -16,7 +16,7 @@
if (!dev->power.power_state)
return;
if (!resume_device(dev))
- dev->power.power_state = 0;
+ dev->power.power_state = PMSG_ON;
}
--- clean-mm/drivers/base/power/sysfs.c 2004-08-15 19:14:55.000000000 +0200
+++ linux-mm/drivers/base/power/sysfs.c 2005-02-28 21:05:15.000000000 +0100
@@ -31,7 +31,7 @@
static ssize_t state_store(struct device * dev, const char * buf, size_t n)
{
- u32 state;
+ pm_message_t state;
char * rest;
int error = 0;
--- clean-mm/drivers/pci/pci.c 2005-02-28 01:13:58.000000000 +0100
+++ linux-mm/drivers/pci/pci.c 2005-02-28 21:05:55.000000000 +0100
@@ -312,13 +312,14 @@
/**
* pci_choose_state - Choose the power state of a PCI device
* @dev: PCI device to be suspended
- * @state: target sleep state for the whole system
+ * @state: target sleep state for the whole system. This is the value
+ * that is passed to suspend() function.
*
* Returns PCI power state suitable for given device and given system
* message.
*/
-pci_power_t pci_choose_state(struct pci_dev *dev, u32 state)
+pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state)
{
if (!pci_find_capability(dev, PCI_CAP_ID_PM))
return PCI_D0;
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-02-28 22:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-28 20:15 Fix few remaining u32 vs. pm_message_t issues Pavel Machek
2005-02-28 20:52 ` Greg KH
2005-02-28 22:19 ` Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox