Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139230
b: refs/heads/master
c: 6b318f6
h: refs/heads/master
v: v3
  • Loading branch information
dann frazier authored and Linus Torvalds committed Apr 1, 2009
1 parent a65fc3a commit 7541cbc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 05439f1f89aebbdb791c49e980f0f31652e4055b
refs/heads/master: 6b318f66dca829a72c974083cc10fd5556eec6f1
19 changes: 7 additions & 12 deletions trunk/drivers/rtc/rtc-parisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@

#include <asm/rtc.h>

/* as simple as can be, and no simpler. */
struct parisc_rtc {
struct rtc_device *rtc;
};

static int parisc_get_time(struct device *dev, struct rtc_time *tm)
{
unsigned long ret;
Expand Down Expand Up @@ -47,16 +42,16 @@ static const struct rtc_class_ops parisc_rtc_ops = {

static int __devinit parisc_rtc_probe(struct platform_device *dev)
{
struct parisc_rtc *p;
struct rtc_device *p;

p = kzalloc(sizeof (*p), GFP_KERNEL);
if (!p)
return -ENOMEM;

p->rtc = rtc_device_register("rtc-parisc", &dev->dev, &parisc_rtc_ops,
THIS_MODULE);
if (IS_ERR(p->rtc)) {
int err = PTR_ERR(p->rtc);
p = rtc_device_register("rtc-parisc", &dev->dev, &parisc_rtc_ops,
THIS_MODULE);
if (IS_ERR(p)) {
int err = PTR_ERR(p);
kfree(p);
return err;
}
Expand All @@ -68,9 +63,9 @@ static int __devinit parisc_rtc_probe(struct platform_device *dev)

static int __devexit parisc_rtc_remove(struct platform_device *dev)
{
struct parisc_rtc *p = platform_get_drvdata(dev);
struct rtc_device *p = platform_get_drvdata(dev);

rtc_device_unregister(p->rtc);
rtc_device_unregister(p);
kfree(p);

return 0;
Expand Down

0 comments on commit 7541cbc

Please sign in to comment.