summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-imxdi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/rtc-imxdi.c')
-rw-r--r--drivers/rtc/rtc-imxdi.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/drivers/rtc/rtc-imxdi.c b/drivers/rtc/rtc-imxdi.c
index 82ed6d5007..e9d68c6739 100644
--- a/drivers/rtc/rtc-imxdi.c
+++ b/drivers/rtc/rtc-imxdi.c
@@ -1,17 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved.
* Copyright 2010 Orex Computed Radiography
*/
-/*
- * The code contained herein is licensed under the GNU General Public
- * License. You may obtain a copy of the GNU General Public License
- * Version 2 or later at the following locations:
- *
- * http://www.opensource.org/licenses/gpl-license.html
- * http://www.gnu.org/copyleft/gpl.html
- */
-
/* based on rtc-mc13892.c */
/*
@@ -110,7 +102,7 @@
* @dsr: copy of the DSR register
*/
struct imxdi_dev {
- struct device_d *dev;
+ struct device *dev;
struct rtc_device rtc;
void __iomem *ioaddr;
struct clk *clk;
@@ -537,20 +529,16 @@ static int nvstore_read(void *ctx, unsigned reg, void *val, size_t bytes)
return 0;
}
-static struct nvmem_bus nvstore_nvmem_bus = {
- .write = nvstore_write,
- .read = nvstore_read,
-};
-
static struct nvmem_config nvstore_nvmem_config = {
.name = "nvstore",
.stride = 4,
.word_size = 4,
.size = 4,
- .bus = &nvstore_nvmem_bus,
+ .reg_write = nvstore_write,
+ .reg_read = nvstore_read,
};
-static int __init dryice_rtc_probe(struct device_d *dev)
+static int __init dryice_rtc_probe(struct device *dev)
{
struct resource *res;
struct imxdi_dev *imxdi;
@@ -611,8 +599,9 @@ static __maybe_unused const struct of_device_id dryice_dt_ids[] = {
{ .compatible = "fsl,imx25-rtc" },
{ /* sentinel */ }
};
+MODULE_DEVICE_TABLE(of, dryice_dt_ids);
-static struct driver_d dryice_rtc_driver = {
+static struct driver dryice_rtc_driver = {
.name = "imx-di-rtc",
.probe = dryice_rtc_probe,
.of_compatible = DRV_OF_COMPAT(dryice_dt_ids),