forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/clk/sunxi/clk-sun6i-apb0-gates.c
....@@ -1,11 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2014 Free Electrons
34 *
4
- * License Terms: GNU General Public License v2
55 * Author: Boris BREZILLON <boris.brezillon@free-electrons.com>
66 *
77 * Allwinner A31 APB0 clock gates driver
8
- *
98 */
109
1110 #include <linux/clk-provider.h>
....@@ -38,7 +37,6 @@
3837 {
3938 struct device_node *np = pdev->dev.of_node;
4039 struct clk_onecell_data *clk_data;
41
- const struct of_device_id *device;
4240 const struct gates_data *data;
4341 const char *clk_parent;
4442 const char *clk_name;
....@@ -51,10 +49,9 @@
5149 if (!np)
5250 return -ENODEV;
5351
54
- device = of_match_device(sun6i_a31_apb0_gates_clk_dt_ids, &pdev->dev);
55
- if (!device)
52
+ data = of_device_get_match_data(&pdev->dev);
53
+ if (!data)
5654 return -ENODEV;
57
- data = device->data;
5855
5956 r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
6057 reg = devm_ioremap_resource(&pdev->dev, r);