summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-pcf85363.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/rtc-pcf85363.c')
-rw-r--r--drivers/rtc/rtc-pcf85363.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/rtc/rtc-pcf85363.c b/drivers/rtc/rtc-pcf85363.c
index 7b785d6a77..bcc251e138 100644
--- a/drivers/rtc/rtc-pcf85363.c
+++ b/drivers/rtc/rtc-pcf85363.c
@@ -16,7 +16,7 @@
#include <malloc.h>
#include <errno.h>
#include <i2c/i2c.h>
-#include <regmap.h>
+#include <linux/regmap.h>
#include <rtc.h>
#include <linux/rtc.h>
#include <linux/bcd.h>
@@ -55,7 +55,7 @@ static inline struct pcf85363 *to_pcf85363_priv(struct rtc_device *rtcdev)
static int pcf85363_rtc_read_time(struct rtc_device *rtcdev,
struct rtc_time *tm)
{
- struct device_d *dev = rtcdev->dev;
+ struct device *dev = rtcdev->dev;
struct pcf85363 *pcf85363 = to_pcf85363_priv(rtcdev);
unsigned char buf[DT_YEARS + 1];
int ret, len = sizeof(buf);
@@ -126,12 +126,11 @@ static const struct regmap_config pcf85363_regmap_i2c_config = {
.max_register = 0x7f,
};
-static int pcf85363_probe(struct device_d *dev)
+static int pcf85363_probe(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct pcf85363 *pcf85363;
struct regmap *regmap;
- int ret;
regmap = regmap_init_i2c(client,
&pcf85363_regmap_i2c_config);
@@ -147,9 +146,7 @@ static int pcf85363_probe(struct device_d *dev)
pcf85363->rtc.ops = &rtc_ops;
pcf85363->rtc.dev = dev;
- ret = rtc_register(&pcf85363->rtc);
-
- return ret;
+ return rtc_register(&pcf85363->rtc);
}
static struct platform_device_id dev_ids[] = {
@@ -157,7 +154,7 @@ static struct platform_device_id dev_ids[] = {
{ /* sentinel */ }
};
-static struct driver_d pcf85363_driver = {
+static struct driver pcf85363_driver = {
.name = "pcf85363",
.probe = pcf85363_probe,
.id_table = dev_ids,