diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2020-11-17 21:30:35 +0100 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2020-11-17 21:55:02 +0100 |
commit | ba7aa63000f26c5a2c87d5a716601499a02a3156 (patch) | |
tree | b286fc7ec3ba766f7add19537a0197cf0c355d31 | |
parent | rtc: mxc: Convert the driver to DT-only (diff) | |
download | linux-ba7aa63000f26c5a2c87d5a716601499a02a3156.tar.xz linux-ba7aa63000f26c5a2c87d5a716601499a02a3156.zip |
rtc: mxc: use of_device_get_match_data
Use of_device_get_match_data to simplify mxc_rtc_probe.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20201117203035.1280099-1-alexandre.belloni@bootlin.com
Diffstat (limited to '')
-rw-r--r-- | drivers/rtc/rtc-mxc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c index 018bfa952d66..0d253ce3a8f5 100644 --- a/drivers/rtc/rtc-mxc.c +++ b/drivers/rtc/rtc-mxc.c @@ -307,14 +307,12 @@ static int mxc_rtc_probe(struct platform_device *pdev) u32 reg; unsigned long rate; int ret; - const struct of_device_id *of_id; pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); if (!pdata) return -ENOMEM; - of_id = of_match_device(imx_rtc_dt_ids, &pdev->dev); - pdata->devtype = (enum imx_rtc_type)of_id->data; + pdata->devtype = (enum imx_rtc_type)of_device_get_match_data(&pdev->dev); pdata->ioaddr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(pdata->ioaddr)) |