Merge branch 'master' into for-linus
authorRafael J. Wysocki <rjw@sisk.pl>
Sun, 16 Aug 2009 09:50:10 +0000 (11:50 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Sun, 16 Aug 2009 09:50:10 +0000 (11:50 +0200)
19 files changed:
arch/arm/include/asm/device.h
arch/arm/plat-omap/debug-leds.c
arch/arm/plat-omap/gpio.c
arch/ia64/include/asm/device.h
arch/microblaze/include/asm/device.h
arch/powerpc/include/asm/device.h
arch/sparc/include/asm/device.h
arch/x86/include/asm/device.h
drivers/base/platform.c
drivers/base/power/main.c
drivers/dma/dw_dmac.c
drivers/dma/txx9dmac.c
drivers/i2c/busses/i2c-pxa.c
drivers/i2c/busses/i2c-s3c2410.c
drivers/pci/pci-driver.c
drivers/usb/musb/musb_core.c
include/asm-generic/device.h
include/linux/device.h
include/linux/platform_device.h

index c61642b406033659db06494a75fcb4c8d8914477..9f390ce335cb00743cb6cd717819f0750b63b0db 100644 (file)
@@ -12,4 +12,7 @@ struct dev_archdata {
 #endif
 };
 
+struct pdev_archdata {
+};
+
 #endif
index be4eefda4767fa11f54177bb6ba8a3a1ed27d770..9395898dd49a38b5d0e517108580bf3cc0365f0b 100644 (file)
@@ -281,24 +281,27 @@ static int /* __init */ fpga_probe(struct platform_device *pdev)
        return 0;
 }
 
-static int fpga_suspend_late(struct platform_device *pdev, pm_message_t mesg)
+static int fpga_suspend_noirq(struct device *dev)
 {
        __raw_writew(~0, &fpga->leds);
        return 0;
 }
 
-static int fpga_resume_early(struct platform_device *pdev)
+static int fpga_resume_noirq(struct device *dev)
 {
        __raw_writew(~hw_led_state, &fpga->leds);
        return 0;
 }
 
+static struct dev_pm_ops fpga_dev_pm_ops = {
+       .suspend_noirq = fpga_suspend_noirq,
+       .resume_noirq = fpga_resume_noirq,
+};
 
 static struct platform_driver led_driver = {
        .driver.name    = "omap_dbg_led",
+       .driver.pm      = &fpga_dev_pm_ops,
        .probe          = fpga_probe,
-       .suspend_late   = fpga_suspend_late,
-       .resume_early   = fpga_resume_early,
 };
 
 static int __init fpga_init(void)
index 26b387c1242393e9bd5450a6751d1ed9a2f3e54c..3d03337ad4227e10601767a4c4a6cf6ef8bb9f78 100644 (file)
@@ -1264,8 +1264,9 @@ static struct irq_chip mpuio_irq_chip = {
 
 #include <linux/platform_device.h>
 
-static int omap_mpuio_suspend_late(struct platform_device *pdev, pm_message_t mesg)
+static int omap_mpuio_suspend_noirq(struct device *dev)
 {
+       struct platform_device *pdev = to_platform_device(dev);
        struct gpio_bank        *bank = platform_get_drvdata(pdev);
        void __iomem            *mask_reg = bank->base + OMAP_MPUIO_GPIO_MASKIT;
        unsigned long           flags;
@@ -1278,8 +1279,9 @@ static int omap_mpuio_suspend_late(struct platform_device *pdev, pm_message_t me
        return 0;
 }
 
-static int omap_mpuio_resume_early(struct platform_device *pdev)
+static int omap_mpuio_resume_noirq(struct device *dev)
 {
+       struct platform_device *pdev = to_platform_device(dev);
        struct gpio_bank        *bank = platform_get_drvdata(pdev);
        void __iomem            *mask_reg = bank->base + OMAP_MPUIO_GPIO_MASKIT;
        unsigned long           flags;
@@ -1291,14 +1293,18 @@ static int omap_mpuio_resume_early(struct platform_device *pdev)
        return 0;
 }
 
+static struct dev_pm_ops omap_mpuio_dev_pm_ops = {
+       .suspend_noirq = omap_mpuio_suspend_noirq,
+       .resume_noirq = omap_mpuio_resume_noirq,
+};
+
 /* use platform_driver for this, now that there's no longer any
  * point to sys_device (other than not disturbing old code).
  */
 static struct platform_driver omap_mpuio_driver = {
-       .suspend_late   = omap_mpuio_suspend_late,
-       .resume_early   = omap_mpuio_resume_early,
        .driver         = {
                .name   = "mpuio",
+               .pm     = &omap_mpuio_dev_pm_ops,
        },
 };
 
index 41ab85d66f33f8228cfa62da8ea8c88ef1888ea3..d66d446b127c5631d6cdcd2fd33e14a8342a8980 100644 (file)
@@ -15,4 +15,7 @@ struct dev_archdata {
 #endif
 };
 
+struct pdev_archdata {
+};
+
 #endif /* _ASM_IA64_DEVICE_H */
index c042830793edd79858b07771d4b58107270ce1c1..30286db27c1c2a08e94c513991deb2a4904d23c1 100644 (file)
@@ -16,6 +16,9 @@ struct dev_archdata {
        struct device_node      *of_node;
 };
 
+struct pdev_archdata {
+};
+
 #endif /* _ASM_MICROBLAZE_DEVICE_H */
 
 
index 7d2277cef09a8502b22bdea95185f132a479f7db..e3e06e0f7fc0b14d78b0205bc74a865768554305 100644 (file)
@@ -30,4 +30,7 @@ dev_archdata_get_node(const struct dev_archdata *ad)
        return ad->of_node;
 }
 
+struct pdev_archdata {
+};
+
 #endif /* _ASM_POWERPC_DEVICE_H */
index 3702e087df2c4cbcdab561f7720a2d8f23ebc543..f3b85b6b0b764796407f2e2a026a5a45163561e2 100644 (file)
@@ -32,4 +32,7 @@ dev_archdata_get_node(const struct dev_archdata *ad)
        return ad->prom_node;
 }
 
+struct pdev_archdata {
+};
+
 #endif /* _ASM_SPARC_DEVICE_H */
index 4994a20acbcbf66aee788ebcb275eac4a2edd442..cee34e9ca45bc9b74aaba7203a340c0922996277 100644 (file)
@@ -13,4 +13,7 @@ struct dma_map_ops *dma_ops;
 #endif
 };
 
+struct pdev_archdata {
+};
+
 #endif /* _ASM_X86_DEVICE_H */
index 456594bd97bc5f13f9189854a73b84dfef157bd8..d28c289e4a3fd8c99c9eaad9cb7502da920cd4c0 100644 (file)
@@ -625,30 +625,6 @@ static int platform_legacy_suspend(struct device *dev, pm_message_t mesg)
        return ret;
 }
 
-static int platform_legacy_suspend_late(struct device *dev, pm_message_t mesg)
-{
-       struct platform_driver *pdrv = to_platform_driver(dev->driver);
-       struct platform_device *pdev = to_platform_device(dev);
-       int ret = 0;
-
-       if (dev->driver && pdrv->suspend_late)
-               ret = pdrv->suspend_late(pdev, mesg);
-
-       return ret;
-}
-
-static int platform_legacy_resume_early(struct device *dev)
-{
-       struct platform_driver *pdrv = to_platform_driver(dev->driver);
-       struct platform_device *pdev = to_platform_device(dev);
-       int ret = 0;
-
-       if (dev->driver && pdrv->resume_early)
-               ret = pdrv->resume_early(pdev);
-
-       return ret;
-}
-
 static int platform_legacy_resume(struct device *dev)
 {
        struct platform_driver *pdrv = to_platform_driver(dev->driver);
@@ -711,8 +687,6 @@ static int platform_pm_suspend_noirq(struct device *dev)
        if (drv->pm) {
                if (drv->pm->suspend_noirq)
                        ret = drv->pm->suspend_noirq(dev);
-       } else {
-               ret = platform_legacy_suspend_late(dev, PMSG_SUSPEND);
        }
 
        return ret;
@@ -747,8 +721,6 @@ static int platform_pm_resume_noirq(struct device *dev)
        if (drv->pm) {
                if (drv->pm->resume_noirq)
                        ret = drv->pm->resume_noirq(dev);
-       } else {
-               ret = platform_legacy_resume_early(dev);
        }
 
        return ret;
@@ -794,8 +766,6 @@ static int platform_pm_freeze_noirq(struct device *dev)
        if (drv->pm) {
                if (drv->pm->freeze_noirq)
                        ret = drv->pm->freeze_noirq(dev);
-       } else {
-               ret = platform_legacy_suspend_late(dev, PMSG_FREEZE);
        }
 
        return ret;
@@ -830,8 +800,6 @@ static int platform_pm_thaw_noirq(struct device *dev)
        if (drv->pm) {
                if (drv->pm->thaw_noirq)
                        ret = drv->pm->thaw_noirq(dev);
-       } else {
-               ret = platform_legacy_resume_early(dev);
        }
 
        return ret;
@@ -866,8 +834,6 @@ static int platform_pm_poweroff_noirq(struct device *dev)
        if (drv->pm) {
                if (drv->pm->poweroff_noirq)
                        ret = drv->pm->poweroff_noirq(dev);
-       } else {
-               ret = platform_legacy_suspend_late(dev, PMSG_HIBERNATE);
        }
 
        return ret;
@@ -902,8 +868,6 @@ static int platform_pm_restore_noirq(struct device *dev)
        if (drv->pm) {
                if (drv->pm->restore_noirq)
                        ret = drv->pm->restore_noirq(dev);
-       } else {
-               ret = platform_legacy_resume_early(dev);
        }
 
        return ret;
@@ -922,7 +886,7 @@ static int platform_pm_restore_noirq(struct device *dev)
 
 #endif /* !CONFIG_HIBERNATION */
 
-static struct dev_pm_ops platform_dev_pm_ops = {
+static const struct dev_pm_ops platform_dev_pm_ops = {
        .prepare = platform_pm_prepare,
        .complete = platform_pm_complete,
        .suspend = platform_pm_suspend,
index 58a3e572f2c903ff81bfe75a51730257c49daf37..1b1a786b7deccb0b690138e97c737d19decf861a 100644 (file)
@@ -157,8 +157,9 @@ void device_pm_move_last(struct device *dev)
  *     @ops:   PM operations to choose from.
  *     @state: PM transition of the system being carried out.
  */
-static int pm_op(struct device *dev, struct dev_pm_ops *ops,
-                       pm_message_t state)
+static int pm_op(struct device *dev,
+                const struct dev_pm_ops *ops,
+                pm_message_t state)
 {
        int error = 0;
 
@@ -220,7 +221,8 @@ static int pm_op(struct device *dev, struct dev_pm_ops *ops,
  *     The operation is executed with interrupts disabled by the only remaining
  *     functional CPU in the system.
  */
-static int pm_noirq_op(struct device *dev, struct dev_pm_ops *ops,
+static int pm_noirq_op(struct device *dev,
+                       const struct dev_pm_ops *ops,
                        pm_message_t state)
 {
        int error = 0;
index 98c9a847bf51c27a8671cd3947690458e0896746..933c143b6a740d8030d0d5318de4232e3d71d1ee 100644 (file)
@@ -1399,8 +1399,9 @@ static void dw_shutdown(struct platform_device *pdev)
        clk_disable(dw->clk);
 }
 
-static int dw_suspend_late(struct platform_device *pdev, pm_message_t mesg)
+static int dw_suspend_noirq(struct device *dev)
 {
+       struct platform_device *pdev = to_platform_device(dev);
        struct dw_dma   *dw = platform_get_drvdata(pdev);
 
        dw_dma_off(platform_get_drvdata(pdev));
@@ -1408,23 +1409,27 @@ static int dw_suspend_late(struct platform_device *pdev, pm_message_t mesg)
        return 0;
 }
 
-static int dw_resume_early(struct platform_device *pdev)
+static int dw_resume_noirq(struct device *dev)
 {
+       struct platform_device *pdev = to_platform_device(dev);
        struct dw_dma   *dw = platform_get_drvdata(pdev);
 
        clk_enable(dw->clk);
        dma_writel(dw, CFG, DW_CFG_DMA_EN);
        return 0;
-
 }
 
+static struct dev_pm_ops dw_dev_pm_ops = {
+       .suspend_noirq = dw_suspend_noirq,
+       .resume_noirq = dw_resume_noirq,
+};
+
 static struct platform_driver dw_driver = {
        .remove         = __exit_p(dw_remove),
        .shutdown       = dw_shutdown,
-       .suspend_late   = dw_suspend_late,
-       .resume_early   = dw_resume_early,
        .driver = {
                .name   = "dw_dmac",
+               .pm     = &dw_dev_pm_ops,
        },
 };
 
index 88dab52926f4ae73217d8f2c8ec55d37d74a0597..7837930146a4fb2d229ce28dcf56675084a5783a 100644 (file)
@@ -1291,17 +1291,18 @@ static void txx9dmac_shutdown(struct platform_device *pdev)
        txx9dmac_off(ddev);
 }
 
-static int txx9dmac_suspend_late(struct platform_device *pdev,
-                                pm_message_t mesg)
+static int txx9dmac_suspend_noirq(struct device *dev)
 {
+       struct platform_device *pdev = to_platform_device(dev);
        struct txx9dmac_dev *ddev = platform_get_drvdata(pdev);
 
        txx9dmac_off(ddev);
        return 0;
 }
 
-static int txx9dmac_resume_early(struct platform_device *pdev)
+static int txx9dmac_resume_noirq(struct device *dev)
 {
+       struct platform_device *pdev = to_platform_device(dev);
        struct txx9dmac_dev *ddev = platform_get_drvdata(pdev);
        struct txx9dmac_platform_data *pdata = pdev->dev.platform_data;
        u32 mcr;
@@ -1314,6 +1315,11 @@ static int txx9dmac_resume_early(struct platform_device *pdev)
 
 }
 
+static struct dev_pm_ops txx9dmac_dev_pm_ops = {
+       .suspend_noirq = txx9dmac_suspend_noirq,
+       .resume_noirq = txx9dmac_resume_noirq,
+};
+
 static struct platform_driver txx9dmac_chan_driver = {
        .remove         = __exit_p(txx9dmac_chan_remove),
        .driver = {
@@ -1324,10 +1330,9 @@ static struct platform_driver txx9dmac_chan_driver = {
 static struct platform_driver txx9dmac_driver = {
        .remove         = __exit_p(txx9dmac_remove),
        .shutdown       = txx9dmac_shutdown,
-       .suspend_late   = txx9dmac_suspend_late,
-       .resume_early   = txx9dmac_resume_early,
        .driver = {
                .name   = "txx9dmac",
+               .pm     = &txx9dmac_dev_pm_ops,
        },
 };
 
index 762e1e530882f814bb05f9fcc5f39f9e44ef5539..049555777f67da5549cca3d689977809bbef0153 100644 (file)
@@ -1134,35 +1134,44 @@ static int __exit i2c_pxa_remove(struct platform_device *dev)
 }
 
 #ifdef CONFIG_PM
-static int i2c_pxa_suspend_late(struct platform_device *dev, pm_message_t state)
+static int i2c_pxa_suspend_noirq(struct device *dev)
 {
-       struct pxa_i2c *i2c = platform_get_drvdata(dev);
+       struct platform_device *pdev = to_platform_device(dev);
+       struct pxa_i2c *i2c = platform_get_drvdata(pdev);
+
        clk_disable(i2c->clk);
+
        return 0;
 }
 
-static int i2c_pxa_resume_early(struct platform_device *dev)
+static int i2c_pxa_resume_noirq(struct device *dev)
 {
-       struct pxa_i2c *i2c = platform_get_drvdata(dev);
+       struct platform_device *pdev = to_platform_device(dev);
+       struct pxa_i2c *i2c = platform_get_drvdata(pdev);
 
        clk_enable(i2c->clk);
        i2c_pxa_reset(i2c);
 
        return 0;
 }
+
+static struct dev_pm_ops i2c_pxa_dev_pm_ops = {
+       .suspend_noirq = i2c_pxa_suspend_noirq,
+       .resume_noirq = i2c_pxa_resume_noirq,
+};
+
+#define I2C_PXA_DEV_PM_OPS (&i2c_pxa_dev_pm_ops)
 #else
-#define i2c_pxa_suspend_late NULL
-#define i2c_pxa_resume_early NULL
+#define I2C_PXA_DEV_PM_OPS NULL
 #endif
 
 static struct platform_driver i2c_pxa_driver = {
        .probe          = i2c_pxa_probe,
        .remove         = __exit_p(i2c_pxa_remove),
-       .suspend_late   = i2c_pxa_suspend_late,
-       .resume_early   = i2c_pxa_resume_early,
        .driver         = {
                .name   = "pxa2xx-i2c",
                .owner  = THIS_MODULE,
+               .pm     = I2C_PXA_DEV_PM_OPS,
        },
        .id_table       = i2c_pxa_id_table,
 };
index 20bb0ceb027b79d029a915187bccf625d3560ec0..96aafb91b69a78e482eab02d3df45dbd70a7bfc3 100644 (file)
@@ -946,17 +946,20 @@ static int s3c24xx_i2c_remove(struct platform_device *pdev)
 }
 
 #ifdef CONFIG_PM
-static int s3c24xx_i2c_suspend_late(struct platform_device *dev,
-                                   pm_message_t msg)
+static int s3c24xx_i2c_suspend_noirq(struct device *dev)
 {
-       struct s3c24xx_i2c *i2c = platform_get_drvdata(dev);
+       struct platform_device *pdev = to_platform_device(dev);
+       struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev);
+
        i2c->suspended = 1;
+
        return 0;
 }
 
-static int s3c24xx_i2c_resume(struct platform_device *dev)
+static int s3c24xx_i2c_resume(struct device *dev)
 {
-       struct s3c24xx_i2c *i2c = platform_get_drvdata(dev);
+       struct platform_device *pdev = to_platform_device(dev);
+       struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev);
 
        i2c->suspended = 0;
        s3c24xx_i2c_init(i2c);
@@ -964,9 +967,14 @@ static int s3c24xx_i2c_resume(struct platform_device *dev)
        return 0;
 }
 
+static struct dev_pm_ops s3c24xx_i2c_dev_pm_ops = {
+       .suspend_noirq = s3c24xx_i2c_suspend_noirq,
+       .resume = s3c24xx_i2c_resume,
+};
+
+#define S3C24XX_DEV_PM_OPS (&s3c24xx_i2c_dev_pm_ops)
 #else
-#define s3c24xx_i2c_suspend_late NULL
-#define s3c24xx_i2c_resume NULL
+#define S3C24XX_DEV_PM_OPS NULL
 #endif
 
 /* device driver for platform bus bits */
@@ -985,12 +993,11 @@ MODULE_DEVICE_TABLE(platform, s3c24xx_driver_ids);
 static struct platform_driver s3c24xx_i2c_driver = {
        .probe          = s3c24xx_i2c_probe,
        .remove         = s3c24xx_i2c_remove,
-       .suspend_late   = s3c24xx_i2c_suspend_late,
-       .resume         = s3c24xx_i2c_resume,
        .id_table       = s3c24xx_driver_ids,
        .driver         = {
                .owner  = THIS_MODULE,
                .name   = "s3c-i2c",
+               .pm     = S3C24XX_DEV_PM_OPS,
        },
 };
 
index d76c4c85367e4368963c9d71092bdaaad6888ce3..0c2ea44ae5e102b97fcdd0ad3593d7bf8ecb9294 100644 (file)
@@ -575,7 +575,7 @@ static void pci_pm_complete(struct device *dev)
 static int pci_pm_suspend(struct device *dev)
 {
        struct pci_dev *pci_dev = to_pci_dev(dev);
-       struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
+       const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
 
        if (pci_has_legacy_pm_support(pci_dev))
                return pci_legacy_suspend(dev, PMSG_SUSPEND);
@@ -613,7 +613,7 @@ static int pci_pm_suspend(struct device *dev)
 static int pci_pm_suspend_noirq(struct device *dev)
 {
        struct pci_dev *pci_dev = to_pci_dev(dev);
-       struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
+       const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
 
        if (pci_has_legacy_pm_support(pci_dev))
                return pci_legacy_suspend_late(dev, PMSG_SUSPEND);
@@ -672,7 +672,7 @@ static int pci_pm_resume_noirq(struct device *dev)
 static int pci_pm_resume(struct device *dev)
 {
        struct pci_dev *pci_dev = to_pci_dev(dev);
-       struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
+       const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
        int error = 0;
 
        /*
@@ -711,7 +711,7 @@ static int pci_pm_resume(struct device *dev)
 static int pci_pm_freeze(struct device *dev)
 {
        struct pci_dev *pci_dev = to_pci_dev(dev);
-       struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
+       const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
 
        if (pci_has_legacy_pm_support(pci_dev))
                return pci_legacy_suspend(dev, PMSG_FREEZE);
@@ -780,7 +780,7 @@ static int pci_pm_thaw_noirq(struct device *dev)
 static int pci_pm_thaw(struct device *dev)
 {
        struct pci_dev *pci_dev = to_pci_dev(dev);
-       struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
+       const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
        int error = 0;
 
        if (pci_has_legacy_pm_support(pci_dev))
@@ -799,7 +799,7 @@ static int pci_pm_thaw(struct device *dev)
 static int pci_pm_poweroff(struct device *dev)
 {
        struct pci_dev *pci_dev = to_pci_dev(dev);
-       struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
+       const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
 
        if (pci_has_legacy_pm_support(pci_dev))
                return pci_legacy_suspend(dev, PMSG_HIBERNATE);
@@ -872,7 +872,7 @@ static int pci_pm_restore_noirq(struct device *dev)
 static int pci_pm_restore(struct device *dev)
 {
        struct pci_dev *pci_dev = to_pci_dev(dev);
-       struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
+       const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
        int error = 0;
 
        /*
@@ -910,7 +910,7 @@ static int pci_pm_restore(struct device *dev)
 
 #endif /* !CONFIG_HIBERNATION */
 
-struct dev_pm_ops pci_dev_pm_ops = {
+const struct dev_pm_ops pci_dev_pm_ops = {
        .prepare = pci_pm_prepare,
        .complete = pci_pm_complete,
        .suspend = pci_pm_suspend,
index c7c1ca0494cda359096b1eeeb281a55b80f2c994..1d26beddf2ca846f92ecfd8fa294fa8bb24ff363 100644 (file)
@@ -2167,8 +2167,9 @@ static int __devexit musb_remove(struct platform_device *pdev)
 
 #ifdef CONFIG_PM
 
-static int musb_suspend(struct platform_device *pdev, pm_message_t message)
+static int musb_suspend(struct device *dev)
 {
+       struct platform_device *pdev = to_platform_device(dev);
        unsigned long   flags;
        struct musb     *musb = dev_to_musb(&pdev->dev);
 
@@ -2195,8 +2196,9 @@ static int musb_suspend(struct platform_device *pdev, pm_message_t message)
        return 0;
 }
 
-static int musb_resume_early(struct platform_device *pdev)
+static int musb_resume_noirq(struct device *dev)
 {
+       struct platform_device *pdev = to_platform_device(dev);
        struct musb     *musb = dev_to_musb(&pdev->dev);
 
        if (!musb->clock)
@@ -2214,9 +2216,14 @@ static int musb_resume_early(struct platform_device *pdev)
        return 0;
 }
 
+static struct dev_pm_ops musb_dev_pm_ops = {
+       .suspend        = musb_suspend,
+       .resume_noirq   = musb_resume_noirq,
+};
+
+#define MUSB_DEV_PM_OPS (&musb_dev_pm_ops)
 #else
-#define        musb_suspend    NULL
-#define        musb_resume_early       NULL
+#define        MUSB_DEV_PM_OPS NULL
 #endif
 
 static struct platform_driver musb_driver = {
@@ -2224,11 +2231,10 @@ static struct platform_driver musb_driver = {
                .name           = (char *)musb_driver_name,
                .bus            = &platform_bus_type,
                .owner          = THIS_MODULE,
+               .pm             = MUSB_DEV_PM_OPS,
        },
        .remove         = __devexit_p(musb_remove),
        .shutdown       = musb_shutdown,
-       .suspend        = musb_suspend,
-       .resume_early   = musb_resume_early,
 };
 
 /*-------------------------------------------------------------------------*/
index c17c9600f220c2964cb07a6076bb268ebe69f89b..d7c76bba640d7d6a02041b3b12a5c224501549b1 100644 (file)
@@ -9,4 +9,7 @@
 struct dev_archdata {
 };
 
+struct pdev_archdata {
+};
+
 #endif /* _ASM_GENERIC_DEVICE_H */
index aebb81036db2d368a7b55664f5a2b9d102c5109d..a28642975053f9cf63480f11325463da410947c9 100644 (file)
@@ -62,7 +62,7 @@ struct bus_type {
        int (*suspend)(struct device *dev, pm_message_t state);
        int (*resume)(struct device *dev);
 
-       struct dev_pm_ops *pm;
+       const struct dev_pm_ops *pm;
 
        struct bus_type_private *p;
 };
@@ -132,7 +132,7 @@ struct device_driver {
        int (*resume) (struct device *dev);
        struct attribute_group **groups;
 
-       struct dev_pm_ops *pm;
+       const struct dev_pm_ops *pm;
 
        struct driver_private *p;
 };
@@ -200,7 +200,8 @@ struct class {
        int (*suspend)(struct device *dev, pm_message_t state);
        int (*resume)(struct device *dev);
 
-       struct dev_pm_ops *pm;
+       const struct dev_pm_ops *pm;
+
        struct class_private *p;
 };
 
@@ -291,7 +292,7 @@ struct device_type {
        char *(*nodename)(struct device *dev);
        void (*release)(struct device *dev);
 
-       struct dev_pm_ops *pm;
+       const struct dev_pm_ops *pm;
 };
 
 /* interface for exporting device attributes */
index 8dc5123b63057f3e16ca400847477282a993e892..3c6675c2444bf030ee9036ce3cc4911463a1c90b 100644 (file)
@@ -22,6 +22,9 @@ struct platform_device {
        struct resource * resource;
 
        struct platform_device_id       *id_entry;
+
+       /* arch specific additions */
+       struct pdev_archdata    archdata;
 };
 
 #define platform_get_device_id(pdev)   ((pdev)->id_entry)
@@ -57,8 +60,6 @@ struct platform_driver {
        int (*remove)(struct platform_device *);
        void (*shutdown)(struct platform_device *);
        int (*suspend)(struct platform_device *, pm_message_t state);
-       int (*suspend_late)(struct platform_device *, pm_message_t state);
-       int (*resume_early)(struct platform_device *);
        int (*resume)(struct platform_device *);
        struct device_driver driver;
        struct platform_device_id *id_table;