]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] pm: more u32 vs. pm_message_t fixes
authorPavel Machek <pavel@ucw.cz>
Fri, 8 Jul 2005 00:56:40 +0000 (17:56 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 8 Jul 2005 01:23:43 +0000 (18:23 -0700)
Few more u32 vs. pm_message_t fixes.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/message/fusion/mptbase.c
drivers/message/fusion/mptscsih.h
drivers/net/skge.c
drivers/net/typhoon.c
drivers/pci/pcie/portdrv_core.c
drivers/video/savage/savagefb_driver.c
sound/oss/cs46xx.c

index 8b623278ccd24f90e9966d13b508d35136923329..ffbe6f4720e161da17c25ee6ecc549ef547be929 100644 (file)
@@ -1363,19 +1363,7 @@ mpt_suspend(struct pci_dev *pdev, pm_message_t state)
        u32 device_state;
        MPT_ADAPTER *ioc = pci_get_drvdata(pdev);
 
-       switch(state)
-       {
-               case 1: /* S1 */
-                       device_state=1; /* D1 */;
-                       break;
-               case 3: /* S3 */
-               case 4: /* S4 */
-                       device_state=3; /* D3 */;
-                       break;
-               default:
-                       return -EAGAIN /*FIXME*/;
-                       break;
-       }
+       device_state=pci_choose_state(pdev, state);
 
        printk(MYIOC_s_INFO_FMT
        "pci-suspend: pdev=0x%p, slot=%s, Entering operating state [D%d]\n",
index 5ea89bf0df199862e26c1398f006818b852ea66d..debb8ac5954571a683e26e7e77023b8ec382665d 100644 (file)
@@ -84,7 +84,7 @@
 extern void mptscsih_remove(struct pci_dev *);
 extern void mptscsih_shutdown(struct pci_dev *);
 #ifdef CONFIG_PM
-extern int mptscsih_suspend(struct pci_dev *pdev, u32 state);
+extern int mptscsih_suspend(struct pci_dev *pdev, pm_message_t state);
 extern int mptscsih_resume(struct pci_dev *pdev);
 #endif
 extern int mptscsih_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, int length, int func);
index 3dbb1cb09ed823d99c669a409f17f0b42570059b..5cacc7ad9e79a9f8505b7dbb34a59604293b4601 100644 (file)
@@ -3259,7 +3259,7 @@ static void __devexit skge_remove(struct pci_dev *pdev)
 }
 
 #ifdef CONFIG_PM
-static int skge_suspend(struct pci_dev *pdev, u32 state)
+static int skge_suspend(struct pci_dev *pdev, pm_message_t state)
 {
        struct skge_hw *hw  = pci_get_drvdata(pdev);
        int i, wol = 0;
@@ -3279,7 +3279,7 @@ static int skge_suspend(struct pci_dev *pdev, u32 state)
        }
 
        pci_save_state(pdev);
-       pci_enable_wake(pdev, state, wol);
+       pci_enable_wake(pdev, pci_choose_state(pdev, state), wol);
        pci_disable_device(pdev);
        pci_set_power_state(pdev, pci_choose_state(pdev, state));
 
index 0b5ca25379634cc9e49f8ca63c3132151e7a531b..ecfa6f8805ce0ef050448e777e68364b7d50a32e 100644 (file)
@@ -1906,9 +1906,9 @@ typhoon_sleep(struct typhoon *tp, pci_power_t state, u16 events)
         */
        netif_carrier_off(tp->dev);
 
-       pci_enable_wake(tp->pdev, pci_choose_state(pdev, state), 1);
+       pci_enable_wake(tp->pdev, state, 1);
        pci_disable_device(pdev);
-       return pci_set_power_state(pdev, pci_choose_state(pdev, state));
+       return pci_set_power_state(pdev, state);
 }
 
 static int
@@ -2274,7 +2274,7 @@ typhoon_suspend(struct pci_dev *pdev, pm_message_t state)
                goto need_resume;
        }
 
-       if(typhoon_sleep(tp, state, tp->wol_events) < 0) {
+       if(typhoon_sleep(tp, pci_choose_state(pdev, state), tp->wol_events) < 0) {
                printk(KERN_ERR "%s: unable to put card to sleep\n", dev->name);
                goto need_resume;
        }
index 4db69982876ef6ca6c7c57ca313a941956635442..393e0cee91a93cfb50e518c02909605943ed57c2 100644 (file)
@@ -325,7 +325,7 @@ int pcie_port_device_register(struct pci_dev *dev)
 static int suspend_iter(struct device *dev, void *data)
 {
        struct pcie_port_service_driver *service_driver;
-       u32 state = (u32)data;
+       pm_message_t state = * (pm_message_t *) data;
 
        if ((dev->bus == &pcie_port_bus_type) &&
            (dev->driver)) {
@@ -336,9 +336,9 @@ static int suspend_iter(struct device *dev, void *data)
        return 0;
 }
 
-int pcie_port_device_suspend(struct pci_dev *dev, u32 state)
+int pcie_port_device_suspend(struct pci_dev *dev, pm_message_t state)
 {
-       device_for_each_child(&dev->dev, (void *)state, suspend_iter);
+       device_for_each_child(&dev->dev, &state, suspend_iter);
        return 0;
 }
 
index 8fadcdae6f426216200ed6659dd3cfbca031e57f..f4633d1891f121070b68ae5c4cb4f53cf0d76ddc 100644 (file)
@@ -2113,7 +2113,7 @@ static int savagefb_suspend (struct pci_dev* dev, pm_message_t state)
        printk(KERN_DEBUG "state: %u\n", state);
 
        acquire_console_sem();
-       fb_set_suspend(info, state);
+       fb_set_suspend(info, pci_choose_state(dev, state));
        savage_disable_mmio(par);
        release_console_sem();
 
index 9e42a1a67ca469d2c9f319bb076b2dbd2401b3ea..cb998e8c0fdd51f844fd30ada385adda9587af8c 100644 (file)
@@ -4174,7 +4174,7 @@ static int cs_ioctl_mixdev(struct inode *inode, struct file *file, unsigned int
                                list_for_each(entry, &cs46xx_devs)
                                {
                                        card = list_entry(entry, struct cs_card, list);
-                                       cs46xx_suspend(card, 0);
+                                       cs46xx_suspend(card, PMSG_ON);
                                }
 
                        }
@@ -5749,7 +5749,7 @@ static int cs46xx_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data)
                        case PM_SUSPEND:
                                CS_DBGOUT(CS_PM, 2, printk(KERN_INFO
                                        "cs46xx: PM suspend request\n"));
-                               if(cs46xx_suspend(card, 0))
+                               if(cs46xx_suspend(card, PMSG_SUSPEND))
                                {
                                    CS_DBGOUT(CS_ERROR, 2, printk(KERN_INFO
                                        "cs46xx: PM suspend request refused\n"));
@@ -5779,7 +5779,7 @@ static int cs46xx_suspend_tbl(struct pci_dev *pcidev, pm_message_t state)
        struct cs_card *s = PCI_GET_DRIVER_DATA(pcidev);
        CS_DBGOUT(CS_PM | CS_FUNCTION, 2, 
                printk(KERN_INFO "cs46xx: cs46xx_suspend_tbl request\n"));
-       cs46xx_suspend(s, 0);
+       cs46xx_suspend(s, state);
        return 0;
 }