diff options
Diffstat (limited to 'drivers/rtc/rtc-ds1307.c')
-rw-r--r-- | drivers/rtc/rtc-ds1307.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index f1feee4689..e1a8e214d2 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * rtc-ds1307.c - RTC driver for some mostly-compatible I2C chips. * @@ -7,10 +8,6 @@ * Copyright (C) 2006 David Brownell * Copyright (C) 2009 Matthias Fuchs (rx8025 support) * Copyright (C) 2012 Bertrand Achard (nvram access fixes) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ #include <common.h> @@ -196,7 +193,7 @@ static inline struct ds1307 *to_ds1307_priv(struct rtc_device *rtcdev) static int ds1307_get_time(struct rtc_device *rtcdev, struct rtc_time *t) { - struct device_d *dev = rtcdev->dev; + struct device *dev = rtcdev->dev; struct ds1307 *ds1307 = to_ds1307_priv(rtcdev); int tmp; @@ -234,7 +231,7 @@ static int ds1307_get_time(struct rtc_device *rtcdev, struct rtc_time *t) static int ds1307_set_time(struct rtc_device *rtcdev, struct rtc_time *t) { - struct device_d *dev = rtcdev->dev; + struct device *dev = rtcdev->dev; struct ds1307 *ds1307 = to_ds1307_priv(rtcdev); int result; int tmp; @@ -283,7 +280,7 @@ static const struct rtc_class_ops ds13xx_rtc_ops = { .set_time = ds1307_set_time, }; -static int ds1307_probe(struct device_d *dev) +static int ds1307_probe(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct ds1307 *ds1307; @@ -291,7 +288,7 @@ static int ds1307_probe(struct device_d *dev) int tmp; unsigned char *buf; unsigned long driver_data; - const struct device_node *np = dev->device_node; + const struct device_node *np = dev->of_node; ds1307 = xzalloc(sizeof(struct ds1307)); @@ -484,7 +481,7 @@ exit: return err; } -static struct driver_d ds1307_driver = { +static struct driver ds1307_driver = { .name = "rtc-ds1307", .probe = ds1307_probe, .id_table = ds1307_id, |