summaryrefslogtreecommitdiffstats
path: root/drivers/bus/imx-weim.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bus/imx-weim.c')
-rw-r--r--drivers/bus/imx-weim.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c
index c62e948f5b..4907577164 100644
--- a/drivers/bus/imx-weim.c
+++ b/drivers/bus/imx-weim.c
@@ -1,11 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-only
/*
* EIM driver for Freescale's i.MX chips
*
* Copyright (C) 2013 Freescale Semiconductor, Inc.
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
*/
#include <common.h>
#include <driver.h>
@@ -67,9 +64,10 @@ static struct of_device_id weim_id_table[] = {
}, {
}
};
+MODULE_DEVICE_TABLE(of, weim_id_table);
struct imx_weim {
- struct device_d *dev;
+ struct device *dev;
void __iomem *base;
struct imx_weim_devtype *devtype;
};
@@ -109,26 +107,25 @@ static int weim_parse_dt(struct imx_weim *weim)
struct device_node *child;
int ret;
- for_each_child_of_node(weim->dev->device_node, child) {
+ for_each_child_of_node(weim->dev->of_node, child) {
if (!child->name)
continue;
ret = weim_timing_setup(weim, child);
if (ret) {
- dev_err(weim->dev, "%s set timing failed.\n",
- child->full_name);
+ dev_err(weim->dev, "%pOF set timing failed.\n", child);
return ret;
}
}
- ret = of_platform_populate(weim->dev->device_node, NULL, weim->dev);
+ ret = of_platform_populate(weim->dev->of_node, NULL, weim->dev);
if (ret)
- dev_err(weim->dev, "%s fail to create devices.\n",
- weim->dev->device_node->full_name);
+ dev_err(weim->dev, "%pOF failed to create devices.\n",
+ weim->dev->of_node);
return ret;
}
-static int weim_probe(struct device_d *dev)
+static int weim_probe(struct device *dev)
{
struct resource *iores;
struct imx_weim_devtype *devtype;
@@ -166,7 +163,7 @@ weim_err:
return ret;
}
-static struct driver_d weim_driver = {
+static struct driver weim_driver = {
.name = "imx-weim",
.of_compatible = DRV_OF_COMPAT(weim_id_table),
.probe = weim_probe,