| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (c) 2017 MediaTek Inc. |
|---|
| 3 | 4 | * Author: Weiyi Lu <weiyi.lu@mediatek.com> |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 6 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 7 | | - * published by the Free Software Foundation. |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 10 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 11 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 12 | | - * GNU General Public License for more details. |
|---|
| 13 | 5 | */ |
|---|
| 14 | 6 | |
|---|
| 15 | 7 | #include <linux/clk-provider.h> |
|---|
| .. | .. |
|---|
| 136 | 128 | |
|---|
| 137 | 129 | static int clk_mt2712_mm_probe(struct platform_device *pdev) |
|---|
| 138 | 130 | { |
|---|
| 131 | + struct device *dev = &pdev->dev; |
|---|
| 132 | + struct device_node *node = dev->parent->of_node; |
|---|
| 139 | 133 | struct clk_onecell_data *clk_data; |
|---|
| 140 | 134 | int r; |
|---|
| 141 | | - struct device_node *node = pdev->dev.of_node; |
|---|
| 142 | 135 | |
|---|
| 143 | 136 | clk_data = mtk_alloc_clk_data(CLK_MM_NR_CLK); |
|---|
| 144 | 137 | |
|---|
| .. | .. |
|---|
| 154 | 147 | return r; |
|---|
| 155 | 148 | } |
|---|
| 156 | 149 | |
|---|
| 157 | | -static const struct of_device_id of_match_clk_mt2712_mm[] = { |
|---|
| 158 | | - { .compatible = "mediatek,mt2712-mmsys", }, |
|---|
| 159 | | - {} |
|---|
| 160 | | -}; |
|---|
| 161 | | - |
|---|
| 162 | 150 | static struct platform_driver clk_mt2712_mm_drv = { |
|---|
| 163 | 151 | .probe = clk_mt2712_mm_probe, |
|---|
| 164 | 152 | .driver = { |
|---|
| 165 | 153 | .name = "clk-mt2712-mm", |
|---|
| 166 | | - .of_match_table = of_match_clk_mt2712_mm, |
|---|
| 167 | 154 | }, |
|---|
| 168 | 155 | }; |
|---|
| 169 | 156 | |
|---|