Skip to content

Commit 829ca9a

Browse files
pavelmachekLinus Torvalds
authored andcommitted
[PATCH] swsusp: fix remaining u32 vs. pm_message_t confusion
Fix remaining bits of u32 vs. pm_message confusion. Should not break anything. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 7e95888 commit 829ca9a

19 files changed

Lines changed: 35 additions & 48 deletions

File tree

‎arch/i386/kernel/cpu/mtrr/main.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ struct mtrr_value {
561561

562562
static struct mtrr_value * mtrr_state;
563563

564-
static int mtrr_save(struct sys_device * sysdev, u32 state)
564+
static int mtrr_save(struct sys_device * sysdev, pm_message_t state)
565565
{
566566
int i;
567567
int size = num_var_ranges * sizeof(struct mtrr_value);

‎arch/ppc/platforms/pmac_pic.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ static int pmacpic_find_viaint(void)
619619
return viaint;
620620
}
621621

622-
static int pmacpic_suspend(struct sys_device *sysdev, u32 state)
622+
static int pmacpic_suspend(struct sys_device *sysdev, pm_message_t state)
623623
{
624624
int viaint = pmacpic_find_viaint();
625625

‎arch/ppc/syslib/open_pic.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,7 @@ static void openpic_cached_disable_irq(u_int irq)
948948
* we need something better to deal with that... Maybe switch to S1 for
949949
* cpufreq changes
950950
*/
951-
int openpic_suspend(struct sys_device *sysdev, u32 state)
951+
int openpic_suspend(struct sys_device *sysdev, pm_message_t state)
952952
{
953953
int i;
954954
unsigned long flags;

‎arch/x86_64/kernel/nmi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ void enable_timer_nmi_watchdog(void)
290290

291291
static int nmi_pm_active; /* nmi_active before suspend */
292292

293-
static int lapic_nmi_suspend(struct sys_device *dev, u32 state)
293+
static int lapic_nmi_suspend(struct sys_device *dev, pm_message_t state)
294294
{
295295
nmi_pm_active = nmi_active;
296296
disable_lapic_nmi_watchdog();

‎drivers/ide/ppc/pmac.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,7 +1504,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match)
15041504
}
15051505

15061506
static int
1507-
pmac_ide_macio_suspend(struct macio_dev *mdev, u32 state)
1507+
pmac_ide_macio_suspend(struct macio_dev *mdev, pm_message_t state)
15081508
{
15091509
ide_hwif_t *hwif = (ide_hwif_t *)dev_get_drvdata(&mdev->ofdev.dev);
15101510
int rc = 0;
@@ -1527,7 +1527,7 @@ pmac_ide_macio_resume(struct macio_dev *mdev)
15271527
if (mdev->ofdev.dev.power.power_state != 0) {
15281528
rc = pmac_ide_do_resume(hwif);
15291529
if (rc == 0)
1530-
mdev->ofdev.dev.power.power_state = 0;
1530+
mdev->ofdev.dev.power.power_state = PMSG_ON;
15311531
}
15321532

15331533
return rc;
@@ -1608,7 +1608,7 @@ pmac_ide_pci_attach(struct pci_dev *pdev, const struct pci_device_id *id)
16081608
}
16091609

16101610
static int
1611-
pmac_ide_pci_suspend(struct pci_dev *pdev, u32 state)
1611+
pmac_ide_pci_suspend(struct pci_dev *pdev, pm_message_t state)
16121612
{
16131613
ide_hwif_t *hwif = (ide_hwif_t *)pci_get_drvdata(pdev);
16141614
int rc = 0;
@@ -1631,7 +1631,7 @@ pmac_ide_pci_resume(struct pci_dev *pdev)
16311631
if (pdev->dev.power.power_state != 0) {
16321632
rc = pmac_ide_do_resume(hwif);
16331633
if (rc == 0)
1634-
pdev->dev.power.power_state = 0;
1634+
pdev->dev.power.power_state = PMSG_ON;
16351635
}
16361636

16371637
return rc;

‎drivers/macintosh/mediabay.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ static int __pmac media_bay_resume(struct macio_dev *mdev)
724724
struct media_bay_info *bay = macio_get_drvdata(mdev);
725725

726726
if (mdev->ofdev.dev.power.power_state != 0) {
727-
mdev->ofdev.dev.power.power_state = 0;
727+
mdev->ofdev.dev.power.power_state = PMSG_ON;
728728

729729
/* We re-enable the bay using it's previous content
730730
only if it did not change. Note those bozo timings,

‎drivers/media/video/bttv-driver.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4047,7 +4047,6 @@ static int bttv_suspend(struct pci_dev *pci_dev, pm_message_t state)
40474047
struct bttv_buffer_set idle;
40484048
unsigned long flags;
40494049

4050-
dprintk("bttv%d: suspend %d\n", btv->c.nr, state);
40514050

40524051
/* stop dma + irqs */
40534052
spin_lock_irqsave(&btv->s_lock,flags);

‎drivers/media/video/msp3400.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,7 +1416,7 @@ static int msp_detach(struct i2c_client *client);
14161416
static int msp_probe(struct i2c_adapter *adap);
14171417
static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg);
14181418

1419-
static int msp_suspend(struct device * dev, u32 state, u32 level);
1419+
static int msp_suspend(struct device * dev, pm_message_t state, u32 level);
14201420
static int msp_resume(struct device * dev, u32 level);
14211421

14221422
static void msp_wake_thread(struct i2c_client *client);
@@ -1817,7 +1817,7 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
18171817
return 0;
18181818
}
18191819

1820-
static int msp_suspend(struct device * dev, u32 state, u32 level)
1820+
static int msp_suspend(struct device * dev, pm_message_t state, u32 level)
18211821
{
18221822
struct i2c_client *c = container_of(dev, struct i2c_client, dev);
18231823

‎drivers/media/video/tda9887.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ tda9887_command(struct i2c_client *client, unsigned int cmd, void *arg)
760760
return 0;
761761
}
762762

763-
static int tda9887_suspend(struct device * dev, u32 state, u32 level)
763+
static int tda9887_suspend(struct device * dev, pm_message_t state, u32 level)
764764
{
765765
dprintk("tda9887: suspend\n");
766766
return 0;

‎drivers/media/video/tuner-core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
672672
return 0;
673673
}
674674

675-
static int tuner_suspend(struct device *dev, u32 state, u32 level)
675+
static int tuner_suspend(struct device *dev, pm_message_t state, u32 level)
676676
{
677677
struct i2c_client *c = container_of (dev, struct i2c_client, dev);
678678
struct tuner *t = i2c_get_clientdata (c);

0 commit comments

Comments
 (0)