diff options
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-at91.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c index 1679deef9c89..e24484beef07 100644 --- a/drivers/i2c/busses/i2c-at91.c +++ b/drivers/i2c/busses/i2c-at91.c | |||
@@ -279,30 +279,31 @@ static int __devexit at91_i2c_remove(struct platform_device *pdev) | |||
279 | 279 | ||
280 | /* NOTE: could save a few mA by keeping clock off outside of at91_xfer... */ | 280 | /* NOTE: could save a few mA by keeping clock off outside of at91_xfer... */ |
281 | 281 | ||
282 | static int at91_i2c_suspend(struct platform_device *pdev, pm_message_t mesg) | 282 | static int at91_i2c_suspend(struct device *dev) |
283 | { | 283 | { |
284 | clk_disable(twi_clk); | 284 | clk_disable(twi_clk); |
285 | return 0; | 285 | return 0; |
286 | } | 286 | } |
287 | 287 | ||
288 | static int at91_i2c_resume(struct platform_device *pdev) | 288 | static int at91_i2c_resume(struct device *dev) |
289 | { | 289 | { |
290 | return clk_enable(twi_clk); | 290 | return clk_enable(twi_clk); |
291 | } | 291 | } |
292 | 292 | ||
293 | static SIMPLE_DEV_PM_OPS(at91_i2c_pm, at91_i2c_suspend, at91_i2c_resume); | ||
294 | #define AT91_I2C_PM (&at91_i2c_pm) | ||
295 | |||
293 | #else | 296 | #else |
294 | #define at91_i2c_suspend NULL | 297 | #define AT91_I2C_PM NULL |
295 | #define at91_i2c_resume NULL | ||
296 | #endif | 298 | #endif |
297 | 299 | ||
298 | static struct platform_driver at91_i2c_driver = { | 300 | static struct platform_driver at91_i2c_driver = { |
299 | .probe = at91_i2c_probe, | 301 | .probe = at91_i2c_probe, |
300 | .remove = __devexit_p(at91_i2c_remove), | 302 | .remove = __devexit_p(at91_i2c_remove), |
301 | .suspend = at91_i2c_suspend, | ||
302 | .resume = at91_i2c_resume, | ||
303 | .driver = { | 303 | .driver = { |
304 | .name = "at91_i2c", | 304 | .name = "at91_i2c", |
305 | .owner = THIS_MODULE, | 305 | .owner = THIS_MODULE, |
306 | .pm = AT91_I2C_PM, | ||
306 | }, | 307 | }, |
307 | }; | 308 | }; |
308 | 309 | ||