The patch titled From: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx> has been added to the -mm tree. Its filename is rtc-convert-ds1374-to-dev_pm_ops.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: From: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx> There is a general move to replace bus-specific PM ops with dev_pm_ops in order to facilitate core improvements. Do this conversion for DS1374. Signed-off-by: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx> Cc: Alessandro Zummo <a.zummo@xxxxxxxxxxxx> Cc: john stultz <johnstul@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/rtc/rtc-ds1374.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff -puN drivers/rtc/rtc-ds1374.c~rtc-convert-ds1374-to-dev_pm_ops drivers/rtc/rtc-ds1374.c --- a/drivers/rtc/rtc-ds1374.c~rtc-convert-ds1374-to-dev_pm_ops +++ a/drivers/rtc/rtc-ds1374.c @@ -25,6 +25,7 @@ #include <linux/bcd.h> #include <linux/workqueue.h> #include <linux/slab.h> +#include <linux/pm.h> #define DS1374_REG_TOD0 0x00 /* Time of Day */ #define DS1374_REG_TOD1 0x01 @@ -426,32 +427,38 @@ static int __devexit ds1374_remove(struc } #ifdef CONFIG_PM -static int ds1374_suspend(struct i2c_client *client, pm_message_t state) +static int ds1374_suspend(struct device *dev) { + struct i2c_client *client = to_i2c_client(dev); + if (client->irq >= 0 && device_may_wakeup(&client->dev)) enable_irq_wake(client->irq); return 0; } -static int ds1374_resume(struct i2c_client *client) +static int ds1374_resume(struct device *dev) { + struct i2c_client *client = to_i2c_client(dev); + if (client->irq >= 0 && device_may_wakeup(&client->dev)) disable_irq_wake(client->irq); return 0; } + +static SIMPLE_DEV_PM_OPS(ds1374_pm, ds1374_suspend, ds1374_resume); + +#define DS1374_PM (&ds1374_pm) #else -#define ds1374_suspend NULL -#define ds1374_resume NULL +#define DS1374_PM NULL #endif static struct i2c_driver ds1374_driver = { .driver = { .name = "rtc-ds1374", .owner = THIS_MODULE, + .pm = DS1374_PM, }, .probe = ds1374_probe, - .suspend = ds1374_suspend, - .resume = ds1374_resume, .remove = __devexit_p(ds1374_remove), .id_table = ds1374_id, }; _ Patches currently in -mm which might be from broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx are origin.patch linux-next.patch leds-convert-bd2802-driver-to-dev_pm_ops.patch leds-convert-bd2802-driver-to-dev_pm_ops-fix.patch rtc-convert-ds1374-to-dev_pm_ops.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html