File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change 15
15
#include <linux/mfd/syscon.h>
16
16
#include <linux/module.h>
17
17
#include <linux/of.h>
18
- #include <linux/of_platform.h>
19
18
#include <linux/platform_device.h>
20
19
#include <linux/regmap.h>
21
20
#include <linux/watchdog.h>
@@ -42,7 +41,7 @@ struct st_wdog {
42
41
void __iomem * base ;
43
42
struct device * dev ;
44
43
struct regmap * regmap ;
45
- struct st_wdog_syscfg * syscfg ;
44
+ const struct st_wdog_syscfg * syscfg ;
46
45
struct clk * clk ;
47
46
unsigned long clkrate ;
48
47
bool warm_reset ;
@@ -150,7 +149,6 @@ static void st_clk_disable_unprepare(void *data)
150
149
static int st_wdog_probe (struct platform_device * pdev )
151
150
{
152
151
struct device * dev = & pdev -> dev ;
153
- const struct of_device_id * match ;
154
152
struct device_node * np = dev -> of_node ;
155
153
struct st_wdog * st_wdog ;
156
154
struct regmap * regmap ;
@@ -173,12 +171,7 @@ static int st_wdog_probe(struct platform_device *pdev)
173
171
if (!st_wdog )
174
172
return - ENOMEM ;
175
173
176
- match = of_match_device (st_wdog_match , dev );
177
- if (!match ) {
178
- dev_err (dev , "Couldn't match device\n" );
179
- return - ENODEV ;
180
- }
181
- st_wdog -> syscfg = (struct st_wdog_syscfg * )match -> data ;
174
+ st_wdog -> syscfg = (struct st_wdog_syscfg * )device_get_match_data (dev );
182
175
183
176
base = devm_platform_ioremap_resource (pdev , 0 );
184
177
if (IS_ERR (base ))
You can’t perform that action at this time.
0 commit comments