}
 }
 
-#ifdef CONFIG_PM_SLEEP
-static int pcf50633_suspend(struct device *dev)
-{
-       struct i2c_client *client = to_i2c_client(dev);
-       struct pcf50633 *pcf = i2c_get_clientdata(client);
-
-       return pcf50633_irq_suspend(pcf);
-}
-
-static int pcf50633_resume(struct device *dev)
-{
-       struct i2c_client *client = to_i2c_client(dev);
-       struct pcf50633 *pcf = i2c_get_clientdata(client);
-
-       return pcf50633_irq_resume(pcf);
-}
-#endif
-
-static SIMPLE_DEV_PM_OPS(pcf50633_pm, pcf50633_suspend, pcf50633_resume);
-
 static const struct regmap_config pcf50633_regmap_config = {
        .reg_bits = 8,
        .val_bits = 8,
 static struct i2c_driver pcf50633_driver = {
        .driver = {
                .name   = "pcf50633",
-               .pm     = &pcf50633_pm,
+               .pm     = pm_sleep_ptr(&pcf50633_pm),
        },
        .id_table = pcf50633_id_table,
        .probe_new = pcf50633_probe,
 
  * All rights reserved.
  */
 
+#include <linux/i2c.h>
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
 #include <linux/mutex.h>
        return IRQ_HANDLED;
 }
 
-#ifdef CONFIG_PM
-
-int pcf50633_irq_suspend(struct pcf50633 *pcf)
+static int pcf50633_suspend(struct device *dev)
 {
+       struct i2c_client *client = to_i2c_client(dev);
+       struct pcf50633 *pcf = i2c_get_clientdata(client);
        int ret;
        int i;
        u8 res[5];
        return ret;
 }
 
-int pcf50633_irq_resume(struct pcf50633 *pcf)
+static int pcf50633_resume(struct device *dev)
 {
+       struct i2c_client *client = to_i2c_client(dev);
+       struct pcf50633 *pcf = i2c_get_clientdata(client);
        int ret;
 
        /* Write the saved mask registers */
        return ret;
 }
 
-#endif
+EXPORT_GPL_SIMPLE_DEV_PM_OPS(pcf50633_pm, pcf50633_suspend, pcf50633_resume);
 
 int pcf50633_irq_init(struct pcf50633 *pcf, int irq)
 {
 
 #include <linux/workqueue.h>
 #include <linux/regulator/driver.h>
 #include <linux/regulator/machine.h>
+#include <linux/pm.h>
 #include <linux/power_supply.h>
 #include <linux/mfd/pcf50633/backlight.h>
 
 
 int pcf50633_irq_init(struct pcf50633 *pcf, int irq);
 void pcf50633_irq_free(struct pcf50633 *pcf);
-#ifdef CONFIG_PM
-int pcf50633_irq_suspend(struct pcf50633 *pcf);
-int pcf50633_irq_resume(struct pcf50633 *pcf);
-#endif
+extern const struct dev_pm_ops pcf50633_pm;
 
 #endif