projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] m68k: namespace pollution fix (custom->amiga_custom)
[powerpc.git]
/
drivers
/
char
/
vr41xx_rtc.c
diff --git
a/drivers/char/vr41xx_rtc.c
b/drivers/char/vr41xx_rtc.c
index
5e3292d
..
bc1b4a1
100644
(file)
--- a/
drivers/char/vr41xx_rtc.c
+++ b/
drivers/char/vr41xx_rtc.c
@@
-1,7
+1,7
@@
/*
* Driver for NEC VR4100 series Real Time Clock unit.
*
/*
* Driver for NEC VR4100 series Real Time Clock unit.
*
- * Copyright (C) 2003-2005 Yoichi Yuasa <y
uasa@hh.iij4u.or
.jp>
+ * Copyright (C) 2003-2005 Yoichi Yuasa <y
oichi_yuasa@tripeaks.co
.jp>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-37,7
+37,7
@@
#include <asm/uaccess.h>
#include <asm/vr41xx/vr41xx.h>
#include <asm/uaccess.h>
#include <asm/vr41xx/vr41xx.h>
-MODULE_AUTHOR("Yoichi Yuasa <y
uasa@hh.iij4u.or
.jp>");
+MODULE_AUTHOR("Yoichi Yuasa <y
oichi_yuasa@tripeaks.co
.jp>");
MODULE_DESCRIPTION("NEC VR4100 series RTC driver");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("NEC VR4100 series RTC driver");
MODULE_LICENSE("GPL");
@@
-127,8
+127,6
@@
struct resource rtc_resource[2] = {
.flags = IORESOURCE_MEM, },
};
.flags = IORESOURCE_MEM, },
};
-#define RTC_NUM_RESOURCES sizeof(rtc_resource) / sizeof(struct resource)
-
static inline unsigned long read_elapsed_second(void)
{
unsigned long first_low, first_mid, first_high;
static inline unsigned long read_elapsed_second(void)
{
unsigned long first_low, first_mid, first_high;
@@
-560,13
+558,11
@@
static struct miscdevice rtc_miscdevice = {
.fops = &rtc_fops,
};
.fops = &rtc_fops,
};
-static int rtc_probe(struct
device *
dev)
+static int rtc_probe(struct
platform_device *p
dev)
{
{
- struct platform_device *pdev;
unsigned int irq;
int retval;
unsigned int irq;
int retval;
- pdev = to_platform_device(dev);
if (pdev->num_resources != 2)
return -EBUSY;
if (pdev->num_resources != 2)
return -EBUSY;
@@
-635,7
+631,7
@@
static int rtc_probe(struct device *dev)
return 0;
}
return 0;
}
-static int rtc_remove(struct device *dev)
+static int rtc_remove(struct
platform_
device *dev)
{
int retval;
{
int retval;
@@
-655,11
+651,12
@@
static int rtc_remove(struct device *dev)
static struct platform_device *rtc_platform_device;
static struct platform_device *rtc_platform_device;
-static struct device_driver rtc_device_driver = {
- .name = rtc_name,
- .bus = &platform_bus_type,
+static struct platform_driver rtc_device_driver = {
.probe = rtc_probe,
.remove = rtc_remove,
.probe = rtc_probe,
.remove = rtc_remove,
+ .driver = {
+ .name = rtc_name,
+ },
};
static int __devinit vr41xx_rtc_init(void)
};
static int __devinit vr41xx_rtc_init(void)
@@
-687,11
+684,12
@@
static int __devinit vr41xx_rtc_init(void)
break;
}
break;
}
- rtc_platform_device = platform_device_register_simple("RTC", -1, rtc_resource, RTC_NUM_RESOURCES);
+ rtc_platform_device = platform_device_register_simple("RTC", -1,
+ rtc_resource, ARRAY_SIZE(rtc_resource));
if (IS_ERR(rtc_platform_device))
return PTR_ERR(rtc_platform_device);
if (IS_ERR(rtc_platform_device))
return PTR_ERR(rtc_platform_device);
- retval = driver_register(&rtc_device_driver);
+ retval =
platform_
driver_register(&rtc_device_driver);
if (retval < 0)
platform_device_unregister(rtc_platform_device);
if (retval < 0)
platform_device_unregister(rtc_platform_device);
@@
-700,7
+698,7
@@
static int __devinit vr41xx_rtc_init(void)
static void __devexit vr41xx_rtc_exit(void)
{
static void __devexit vr41xx_rtc_exit(void)
{
- driver_unregister(&rtc_device_driver);
+
platform_
driver_unregister(&rtc_device_driver);
platform_device_unregister(rtc_platform_device);
}
platform_device_unregister(rtc_platform_device);
}