File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -259,11 +259,11 @@ static int rockchip_efuse_probe(struct platform_device *pdev)
259
259
struct resource * res ;
260
260
struct nvmem_device * nvmem ;
261
261
struct rockchip_efuse_chip * efuse ;
262
- const struct of_device_id * match ;
262
+ const void * data ;
263
263
struct device * dev = & pdev -> dev ;
264
264
265
- match = of_match_device ( dev -> driver -> of_match_table , dev );
266
- if (!match || ! match -> data ) {
265
+ data = of_device_get_match_data ( dev );
266
+ if (!data ) {
267
267
dev_err (dev , "failed to get match data\n" );
268
268
return - EINVAL ;
269
269
}
@@ -286,7 +286,7 @@ static int rockchip_efuse_probe(struct platform_device *pdev)
286
286
if (of_property_read_u32 (dev -> of_node , "rockchip,efuse-size" ,
287
287
& econfig .size ))
288
288
econfig .size = resource_size (res );
289
- econfig .reg_read = match -> data ;
289
+ econfig .reg_read = data ;
290
290
econfig .priv = efuse ;
291
291
econfig .dev = efuse -> dev ;
292
292
nvmem = devm_nvmem_register (dev , & econfig );
You can’t perform that action at this time.
0 commit comments