~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/rtc/rtc-rp5c01.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
249
249
 
250
250
        spin_lock_init(&priv->lock);
251
251
 
 
252
        platform_set_drvdata(dev, priv);
 
253
 
252
254
        rtc = rtc_device_register("rtc-rp5c01", &dev->dev, &rp5c01_rtc_ops,
253
255
                                  THIS_MODULE);
254
256
        if (IS_ERR(rtc)) {
255
257
                error = PTR_ERR(rtc);
256
258
                goto out_unmap;
257
259
        }
258
 
 
259
260
        priv->rtc = rtc;
260
 
        platform_set_drvdata(dev, priv);
261
261
 
262
262
        error = sysfs_create_bin_file(&dev->dev.kobj, &priv->nvram_attr);
263
263
        if (error)
268
268
out_unregister:
269
269
        rtc_device_unregister(rtc);
270
270
out_unmap:
 
271
        platform_set_drvdata(dev, NULL);
271
272
        iounmap(priv->regs);
272
273
out_free_priv:
273
274
        kfree(priv);