File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 7
7
#include <linux/delay.h>
8
8
#include <linux/notifier.h>
9
9
#include <linux/of.h>
10
- #include <linux/of_device.h>
11
10
#include <linux/platform_device.h>
11
+ #include <linux/property.h>
12
12
#include <linux/reboot.h>
13
13
#include <linux/stat.h>
14
14
#include <linux/vexpress.h>
@@ -108,20 +108,17 @@ static int _vexpress_register_restart_handler(struct device *dev)
108
108
109
109
static int vexpress_reset_probe (struct platform_device * pdev )
110
110
{
111
- const struct of_device_id * match =
112
- of_match_device (vexpress_reset_of_match , & pdev -> dev );
111
+ enum vexpress_reset_func func ;
113
112
struct regmap * regmap ;
114
113
int ret = 0 ;
115
114
116
- if (!match )
117
- return - EINVAL ;
118
-
119
115
regmap = devm_regmap_init_vexpress_config (& pdev -> dev );
120
116
if (IS_ERR (regmap ))
121
117
return PTR_ERR (regmap );
122
118
dev_set_drvdata (& pdev -> dev , regmap );
123
119
124
- switch ((uintptr_t )match -> data ) {
120
+ func = (uintptr_t )device_get_match_data (& pdev -> dev );
121
+ switch (func ) {
125
122
case FUNC_SHUTDOWN :
126
123
vexpress_power_off_device = & pdev -> dev ;
127
124
pm_power_off = vexpress_power_off ;
You can’t perform that action at this time.
0 commit comments