diff options
Diffstat (limited to 'drivers/rtc/rtc-mpc5121.c')
-rw-r--r-- | drivers/rtc/rtc-mpc5121.c | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/drivers/rtc/rtc-mpc5121.c b/drivers/rtc/rtc-mpc5121.c index dfcdf0901d21..09ccd8d3ba2a 100644 --- a/drivers/rtc/rtc-mpc5121.c +++ b/drivers/rtc/rtc-mpc5121.c | |||
@@ -240,36 +240,15 @@ static int mpc5121_rtc_alarm_irq_enable(struct device *dev, | |||
240 | return 0; | 240 | return 0; |
241 | } | 241 | } |
242 | 242 | ||
243 | static int mpc5121_rtc_update_irq_enable(struct device *dev, | ||
244 | unsigned int enabled) | ||
245 | { | ||
246 | struct mpc5121_rtc_data *rtc = dev_get_drvdata(dev); | ||
247 | struct mpc5121_rtc_regs __iomem *regs = rtc->regs; | ||
248 | int val; | ||
249 | |||
250 | val = in_8(®s->int_enable); | ||
251 | |||
252 | if (enabled) | ||
253 | val = (val & ~0x8) | 0x1; | ||
254 | else | ||
255 | val &= ~0x1; | ||
256 | |||
257 | out_8(®s->int_enable, val); | ||
258 | |||
259 | return 0; | ||
260 | } | ||
261 | |||
262 | static const struct rtc_class_ops mpc5121_rtc_ops = { | 243 | static const struct rtc_class_ops mpc5121_rtc_ops = { |
263 | .read_time = mpc5121_rtc_read_time, | 244 | .read_time = mpc5121_rtc_read_time, |
264 | .set_time = mpc5121_rtc_set_time, | 245 | .set_time = mpc5121_rtc_set_time, |
265 | .read_alarm = mpc5121_rtc_read_alarm, | 246 | .read_alarm = mpc5121_rtc_read_alarm, |
266 | .set_alarm = mpc5121_rtc_set_alarm, | 247 | .set_alarm = mpc5121_rtc_set_alarm, |
267 | .alarm_irq_enable = mpc5121_rtc_alarm_irq_enable, | 248 | .alarm_irq_enable = mpc5121_rtc_alarm_irq_enable, |
268 | .update_irq_enable = mpc5121_rtc_update_irq_enable, | ||
269 | }; | 249 | }; |
270 | 250 | ||
271 | static int __devinit mpc5121_rtc_probe(struct platform_device *op, | 251 | static int __devinit mpc5121_rtc_probe(struct platform_device *op) |
272 | const struct of_device_id *match) | ||
273 | { | 252 | { |
274 | struct mpc5121_rtc_data *rtc; | 253 | struct mpc5121_rtc_data *rtc; |
275 | int err = 0; | 254 | int err = 0; |
@@ -364,7 +343,7 @@ static struct of_device_id mpc5121_rtc_match[] __devinitdata = { | |||
364 | {}, | 343 | {}, |
365 | }; | 344 | }; |
366 | 345 | ||
367 | static struct of_platform_driver mpc5121_rtc_driver = { | 346 | static struct platform_driver mpc5121_rtc_driver = { |
368 | .driver = { | 347 | .driver = { |
369 | .name = "mpc5121-rtc", | 348 | .name = "mpc5121-rtc", |
370 | .owner = THIS_MODULE, | 349 | .owner = THIS_MODULE, |
@@ -376,13 +355,13 @@ static struct of_platform_driver mpc5121_rtc_driver = { | |||
376 | 355 | ||
377 | static int __init mpc5121_rtc_init(void) | 356 | static int __init mpc5121_rtc_init(void) |
378 | { | 357 | { |
379 | return of_register_platform_driver(&mpc5121_rtc_driver); | 358 | return platform_driver_register(&mpc5121_rtc_driver); |
380 | } | 359 | } |
381 | module_init(mpc5121_rtc_init); | 360 | module_init(mpc5121_rtc_init); |
382 | 361 | ||
383 | static void __exit mpc5121_rtc_exit(void) | 362 | static void __exit mpc5121_rtc_exit(void) |
384 | { | 363 | { |
385 | of_unregister_platform_driver(&mpc5121_rtc_driver); | 364 | platform_driver_unregister(&mpc5121_rtc_driver); |
386 | } | 365 | } |
387 | module_exit(mpc5121_rtc_exit); | 366 | module_exit(mpc5121_rtc_exit); |
388 | 367 | ||