@@ -83,24 +83,16 @@ static const struct reset_reg_mask reset_bits_65nm = {
83
83
.sw_mstr_rst_mask = BIT (31 ),
84
84
};
85
85
86
- static const struct of_device_id of_match [] = {
87
- { .compatible = "brcm,brcmstb-reboot" , .data = & reset_bits_40nm },
88
- { .compatible = "brcm,bcm7038-reboot" , .data = & reset_bits_65nm },
89
- {},
90
- };
91
-
92
86
static int brcmstb_reboot_probe (struct platform_device * pdev )
93
87
{
94
88
int rc ;
95
89
struct device_node * np = pdev -> dev .of_node ;
96
- const struct of_device_id * of_id ;
97
90
98
- of_id = of_match_node ( of_match , np );
99
- if (!of_id ) {
100
- pr_err ("failed to look up compatible string \n" );
91
+ reset_masks = device_get_match_data ( & pdev -> dev );
92
+ if (!reset_masks ) {
93
+ pr_err ("failed to get match data \n" );
101
94
return - EINVAL ;
102
95
}
103
- reset_masks = of_id -> data ;
104
96
105
97
regmap = syscon_regmap_lookup_by_phandle (np , "syscon" );
106
98
if (IS_ERR (regmap )) {
@@ -130,6 +122,12 @@ static int brcmstb_reboot_probe(struct platform_device *pdev)
130
122
return rc ;
131
123
}
132
124
125
+ static const struct of_device_id of_match [] = {
126
+ { .compatible = "brcm,brcmstb-reboot" , .data = & reset_bits_40nm },
127
+ { .compatible = "brcm,bcm7038-reboot" , .data = & reset_bits_65nm },
128
+ {},
129
+ };
130
+
133
131
static struct platform_driver brcmstb_reboot_driver = {
134
132
.probe = brcmstb_reboot_probe ,
135
133
.driver = {
0 commit comments