aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/pcf50633-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd/pcf50633-core.c')
-rw-r--r--drivers/mfd/pcf50633-core.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c
index 501ce13b693e..c1306ed43e3c 100644
--- a/drivers/mfd/pcf50633-core.c
+++ b/drivers/mfd/pcf50633-core.c
@@ -21,6 +21,7 @@
21#include <linux/workqueue.h> 21#include <linux/workqueue.h>
22#include <linux/platform_device.h> 22#include <linux/platform_device.h>
23#include <linux/i2c.h> 23#include <linux/i2c.h>
24#include <linux/pm.h>
24#include <linux/slab.h> 25#include <linux/slab.h>
25 26
26#include <linux/mfd/pcf50633/core.h> 27#include <linux/mfd/pcf50633/core.h>
@@ -230,27 +231,26 @@ pcf50633_client_dev_register(struct pcf50633 *pcf, const char *name,
230 } 231 }
231} 232}
232 233
233#ifdef CONFIG_PM 234#ifdef CONFIG_PM_SLEEP
234static int pcf50633_suspend(struct i2c_client *client, pm_message_t state) 235static int pcf50633_suspend(struct device *dev)
235{ 236{
236 struct pcf50633 *pcf; 237 struct i2c_client *client = to_i2c_client(dev);
237 pcf = i2c_get_clientdata(client); 238 struct pcf50633 *pcf = i2c_get_clientdata(client);
238 239
239 return pcf50633_irq_suspend(pcf); 240 return pcf50633_irq_suspend(pcf);
240} 241}
241 242
242static int pcf50633_resume(struct i2c_client *client) 243static int pcf50633_resume(struct device *dev)
243{ 244{
244 struct pcf50633 *pcf; 245 struct i2c_client *client = to_i2c_client(dev);
245 pcf = i2c_get_clientdata(client); 246 struct pcf50633 *pcf = i2c_get_clientdata(client);
246 247
247 return pcf50633_irq_resume(pcf); 248 return pcf50633_irq_resume(pcf);
248} 249}
249#else
250#define pcf50633_suspend NULL
251#define pcf50633_resume NULL
252#endif 250#endif
253 251
252static SIMPLE_DEV_PM_OPS(pcf50633_pm, pcf50633_suspend, pcf50633_resume);
253
254static int __devinit pcf50633_probe(struct i2c_client *client, 254static int __devinit pcf50633_probe(struct i2c_client *client,
255 const struct i2c_device_id *ids) 255 const struct i2c_device_id *ids)
256{ 256{
@@ -360,16 +360,16 @@ static struct i2c_device_id pcf50633_id_table[] = {
360 {"pcf50633", 0x73}, 360 {"pcf50633", 0x73},
361 {/* end of list */} 361 {/* end of list */}
362}; 362};
363MODULE_DEVICE_TABLE(i2c, pcf50633_id_table);
363 364
364static struct i2c_driver pcf50633_driver = { 365static struct i2c_driver pcf50633_driver = {
365 .driver = { 366 .driver = {
366 .name = "pcf50633", 367 .name = "pcf50633",
368 .pm = &pcf50633_pm,
367 }, 369 },
368 .id_table = pcf50633_id_table, 370 .id_table = pcf50633_id_table,
369 .probe = pcf50633_probe, 371 .probe = pcf50633_probe,
370 .remove = __devexit_p(pcf50633_remove), 372 .remove = __devexit_p(pcf50633_remove),
371 .suspend = pcf50633_suspend,
372 .resume = pcf50633_resume,
373}; 373};
374 374
375static int __init pcf50633_init(void) 375static int __init pcf50633_init(void)