aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2005-07-07 20:56:40 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-07 21:23:43 -0400
commit2a569579be87b5ba61f9b6c54fd5f9f307c53962 (patch)
tree6cc12f2384d235e87941a85a925618c10b419c7f
parente8af300c3bd87b2310f1e7a642f37e0fe49a754b (diff)
[PATCH] pm: more u32 vs. pm_message_t fixes
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>
-rw-r--r--drivers/message/fusion/mptbase.c14
-rw-r--r--drivers/message/fusion/mptscsih.h2
-rw-r--r--drivers/net/skge.c4
-rw-r--r--drivers/net/typhoon.c6
-rw-r--r--drivers/pci/pcie/portdrv_core.c6
-rw-r--r--drivers/video/savage/savagefb_driver.c2
-rw-r--r--sound/oss/cs46xx.c6
7 files changed, 14 insertions, 26 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 8b623278ccd2..ffbe6f4720e1 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -1363,19 +1363,7 @@ mpt_suspend(struct pci_dev *pdev, pm_message_t state)
1363 u32 device_state; 1363 u32 device_state;
1364 MPT_ADAPTER *ioc = pci_get_drvdata(pdev); 1364 MPT_ADAPTER *ioc = pci_get_drvdata(pdev);
1365 1365
1366 switch(state) 1366 device_state=pci_choose_state(pdev, state);
1367 {
1368 case 1: /* S1 */
1369 device_state=1; /* D1 */;
1370 break;
1371 case 3: /* S3 */
1372 case 4: /* S4 */
1373 device_state=3; /* D3 */;
1374 break;
1375 default:
1376 return -EAGAIN /*FIXME*/;
1377 break;
1378 }
1379 1367
1380 printk(MYIOC_s_INFO_FMT 1368 printk(MYIOC_s_INFO_FMT
1381 "pci-suspend: pdev=0x%p, slot=%s, Entering operating state [D%d]\n", 1369 "pci-suspend: pdev=0x%p, slot=%s, Entering operating state [D%d]\n",
diff --git a/drivers/message/fusion/mptscsih.h b/drivers/message/fusion/mptscsih.h
index 5ea89bf0df19..debb8ac59545 100644
--- a/drivers/message/fusion/mptscsih.h
+++ b/drivers/message/fusion/mptscsih.h
@@ -84,7 +84,7 @@
84extern void mptscsih_remove(struct pci_dev *); 84extern void mptscsih_remove(struct pci_dev *);
85extern void mptscsih_shutdown(struct pci_dev *); 85extern void mptscsih_shutdown(struct pci_dev *);
86#ifdef CONFIG_PM 86#ifdef CONFIG_PM
87extern int mptscsih_suspend(struct pci_dev *pdev, u32 state); 87extern int mptscsih_suspend(struct pci_dev *pdev, pm_message_t state);
88extern int mptscsih_resume(struct pci_dev *pdev); 88extern int mptscsih_resume(struct pci_dev *pdev);
89#endif 89#endif
90extern int mptscsih_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, int length, int func); 90extern int mptscsih_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, int length, int func);
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index 3dbb1cb09ed8..5cacc7ad9e79 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -3259,7 +3259,7 @@ static void __devexit skge_remove(struct pci_dev *pdev)
3259} 3259}
3260 3260
3261#ifdef CONFIG_PM 3261#ifdef CONFIG_PM
3262static int skge_suspend(struct pci_dev *pdev, u32 state) 3262static int skge_suspend(struct pci_dev *pdev, pm_message_t state)
3263{ 3263{
3264 struct skge_hw *hw = pci_get_drvdata(pdev); 3264 struct skge_hw *hw = pci_get_drvdata(pdev);
3265 int i, wol = 0; 3265 int i, wol = 0;
@@ -3279,7 +3279,7 @@ static int skge_suspend(struct pci_dev *pdev, u32 state)
3279 } 3279 }
3280 3280
3281 pci_save_state(pdev); 3281 pci_save_state(pdev);
3282 pci_enable_wake(pdev, state, wol); 3282 pci_enable_wake(pdev, pci_choose_state(pdev, state), wol);
3283 pci_disable_device(pdev); 3283 pci_disable_device(pdev);
3284 pci_set_power_state(pdev, pci_choose_state(pdev, state)); 3284 pci_set_power_state(pdev, pci_choose_state(pdev, state));
3285 3285
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c
index 0b5ca2537963..ecfa6f8805ce 100644
--- a/drivers/net/typhoon.c
+++ b/drivers/net/typhoon.c
@@ -1906,9 +1906,9 @@ typhoon_sleep(struct typhoon *tp, pci_power_t state, u16 events)
1906 */ 1906 */
1907 netif_carrier_off(tp->dev); 1907 netif_carrier_off(tp->dev);
1908 1908
1909 pci_enable_wake(tp->pdev, pci_choose_state(pdev, state), 1); 1909 pci_enable_wake(tp->pdev, state, 1);
1910 pci_disable_device(pdev); 1910 pci_disable_device(pdev);
1911 return pci_set_power_state(pdev, pci_choose_state(pdev, state)); 1911 return pci_set_power_state(pdev, state);
1912} 1912}
1913 1913
1914static int 1914static int
@@ -2274,7 +2274,7 @@ typhoon_suspend(struct pci_dev *pdev, pm_message_t state)
2274 goto need_resume; 2274 goto need_resume;
2275 } 2275 }
2276 2276
2277 if(typhoon_sleep(tp, state, tp->wol_events) < 0) { 2277 if(typhoon_sleep(tp, pci_choose_state(pdev, state), tp->wol_events) < 0) {
2278 printk(KERN_ERR "%s: unable to put card to sleep\n", dev->name); 2278 printk(KERN_ERR "%s: unable to put card to sleep\n", dev->name);
2279 goto need_resume; 2279 goto need_resume;
2280 } 2280 }
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c
index 4db69982876e..393e0cee91a9 100644
--- a/drivers/pci/pcie/portdrv_core.c
+++ b/drivers/pci/pcie/portdrv_core.c
@@ -325,7 +325,7 @@ int pcie_port_device_register(struct pci_dev *dev)
325static int suspend_iter(struct device *dev, void *data) 325static int suspend_iter(struct device *dev, void *data)
326{ 326{
327 struct pcie_port_service_driver *service_driver; 327 struct pcie_port_service_driver *service_driver;
328 u32 state = (u32)data; 328 pm_message_t state = * (pm_message_t *) data;
329 329
330 if ((dev->bus == &pcie_port_bus_type) && 330 if ((dev->bus == &pcie_port_bus_type) &&
331 (dev->driver)) { 331 (dev->driver)) {
@@ -336,9 +336,9 @@ static int suspend_iter(struct device *dev, void *data)
336 return 0; 336 return 0;
337} 337}
338 338
339int pcie_port_device_suspend(struct pci_dev *dev, u32 state) 339int pcie_port_device_suspend(struct pci_dev *dev, pm_message_t state)
340{ 340{
341 device_for_each_child(&dev->dev, (void *)state, suspend_iter); 341 device_for_each_child(&dev->dev, &state, suspend_iter);
342 return 0; 342 return 0;
343} 343}
344 344
diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c
index 8fadcdae6f42..f4633d1891f1 100644
--- a/drivers/video/savage/savagefb_driver.c
+++ b/drivers/video/savage/savagefb_driver.c
@@ -2113,7 +2113,7 @@ static int savagefb_suspend (struct pci_dev* dev, pm_message_t state)
2113 printk(KERN_DEBUG "state: %u\n", state); 2113 printk(KERN_DEBUG "state: %u\n", state);
2114 2114
2115 acquire_console_sem(); 2115 acquire_console_sem();
2116 fb_set_suspend(info, state); 2116 fb_set_suspend(info, pci_choose_state(dev, state));
2117 savage_disable_mmio(par); 2117 savage_disable_mmio(par);
2118 release_console_sem(); 2118 release_console_sem();
2119 2119
diff --git a/sound/oss/cs46xx.c b/sound/oss/cs46xx.c
index 9e42a1a67ca4..cb998e8c0fdd 100644
--- a/sound/oss/cs46xx.c
+++ b/sound/oss/cs46xx.c
@@ -4174,7 +4174,7 @@ static int cs_ioctl_mixdev(struct inode *inode, struct file *file, unsigned int
4174 list_for_each(entry, &cs46xx_devs) 4174 list_for_each(entry, &cs46xx_devs)
4175 { 4175 {
4176 card = list_entry(entry, struct cs_card, list); 4176 card = list_entry(entry, struct cs_card, list);
4177 cs46xx_suspend(card, 0); 4177 cs46xx_suspend(card, PMSG_ON);
4178 } 4178 }
4179 4179
4180 } 4180 }
@@ -5749,7 +5749,7 @@ static int cs46xx_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data)
5749 case PM_SUSPEND: 5749 case PM_SUSPEND:
5750 CS_DBGOUT(CS_PM, 2, printk(KERN_INFO 5750 CS_DBGOUT(CS_PM, 2, printk(KERN_INFO
5751 "cs46xx: PM suspend request\n")); 5751 "cs46xx: PM suspend request\n"));
5752 if(cs46xx_suspend(card, 0)) 5752 if(cs46xx_suspend(card, PMSG_SUSPEND))
5753 { 5753 {
5754 CS_DBGOUT(CS_ERROR, 2, printk(KERN_INFO 5754 CS_DBGOUT(CS_ERROR, 2, printk(KERN_INFO
5755 "cs46xx: PM suspend request refused\n")); 5755 "cs46xx: PM suspend request refused\n"));
@@ -5779,7 +5779,7 @@ static int cs46xx_suspend_tbl(struct pci_dev *pcidev, pm_message_t state)
5779 struct cs_card *s = PCI_GET_DRIVER_DATA(pcidev); 5779 struct cs_card *s = PCI_GET_DRIVER_DATA(pcidev);
5780 CS_DBGOUT(CS_PM | CS_FUNCTION, 2, 5780 CS_DBGOUT(CS_PM | CS_FUNCTION, 2,
5781 printk(KERN_INFO "cs46xx: cs46xx_suspend_tbl request\n")); 5781 printk(KERN_INFO "cs46xx: cs46xx_suspend_tbl request\n"));
5782 cs46xx_suspend(s, 0); 5782 cs46xx_suspend(s, state);
5783 return 0; 5783 return 0;
5784} 5784}
5785 5785