File tree Expand file tree Collapse file tree 3 files changed +12
-20
lines changed Expand file tree Collapse file tree 3 files changed +12
-20
lines changed Original file line number Diff line number Diff line change 30
30
#include <linux/slab.h>
31
31
#include <linux/device.h>
32
32
#include <linux/platform_device.h>
33
+ #include <linux/property.h>
33
34
#include <linux/mtd/mtd.h>
34
35
#include <linux/mtd/map.h>
35
36
#include <linux/mtd/partitions.h>
36
37
#include <linux/mtd/physmap.h>
37
38
#include <linux/mtd/concat.h>
38
39
#include <linux/mtd/cfi_endian.h>
39
40
#include <linux/io.h>
40
- #include <linux/of_device .h>
41
+ #include <linux/of .h>
41
42
#include <linux/pm_runtime.h>
42
43
#include <linux/gpio/consumer.h>
43
44
@@ -295,14 +296,9 @@ static const char * const *of_get_part_probes(struct platform_device *dev)
295
296
static const char * of_select_probe_type (struct platform_device * dev )
296
297
{
297
298
struct device_node * dp = dev -> dev .of_node ;
298
- const struct of_device_id * match ;
299
299
const char * probe_type ;
300
300
301
- match = of_match_device (of_flash_match , & dev -> dev );
302
- if (!match )
303
- return NULL ;
304
-
305
- probe_type = match -> data ;
301
+ probe_type = device_get_match_data (& dev -> dev );
306
302
if (probe_type )
307
303
return probe_type ;
308
304
Original file line number Diff line number Diff line change 15
15
#include <linux/module.h>
16
16
#include <linux/mtd/mtd.h>
17
17
#include <linux/mtd/rawnand.h>
18
- #include <linux/of_device.h>
19
18
#include <linux/iopoll.h>
19
+ #include <linux/of.h>
20
+ #include <linux/platform_device.h>
21
+ #include <linux/property.h>
20
22
#include <linux/slab.h>
21
23
22
24
/*
@@ -2995,15 +2997,11 @@ static int cadence_nand_dt_probe(struct platform_device *ofdev)
2995
2997
struct cadence_nand_dt * dt ;
2996
2998
struct cdns_nand_ctrl * cdns_ctrl ;
2997
2999
int ret ;
2998
- const struct of_device_id * of_id ;
2999
3000
const struct cadence_nand_dt_devdata * devdata ;
3000
3001
u32 val ;
3001
3002
3002
- of_id = of_match_device (cadence_nand_dt_ids , & ofdev -> dev );
3003
- if (of_id ) {
3004
- ofdev -> id_entry = of_id -> data ;
3005
- devdata = of_id -> data ;
3006
- } else {
3003
+ devdata = device_get_match_data (& ofdev -> dev );
3004
+ if (!devdata ) {
3007
3005
pr_err ("Failed to find the right device id.\n" );
3008
3006
return - ENOMEM ;
3009
3007
}
Original file line number Diff line number Diff line change 29
29
#include <linux/mtd/mtd.h>
30
30
#include <linux/mtd/rawnand.h>
31
31
#include <linux/mtd/partitions.h>
32
- #include <linux/of_device .h>
32
+ #include <linux/of .h>
33
33
#include <linux/platform_device.h>
34
+ #include <linux/property.h>
34
35
#include <linux/slab.h>
35
36
#include <linux/swab.h>
36
37
@@ -810,7 +811,6 @@ static int vf610_nfc_probe(struct platform_device *pdev)
810
811
struct mtd_info * mtd ;
811
812
struct nand_chip * chip ;
812
813
struct device_node * child ;
813
- const struct of_device_id * of_id ;
814
814
int err ;
815
815
int irq ;
816
816
@@ -840,12 +840,10 @@ static int vf610_nfc_probe(struct platform_device *pdev)
840
840
return PTR_ERR (nfc -> clk );
841
841
}
842
842
843
- of_id = of_match_device ( vf610_nfc_dt_ids , & pdev -> dev );
844
- if (!of_id )
843
+ nfc -> variant = ( enum vf610_nfc_variant ) device_get_match_data ( & pdev -> dev );
844
+ if (!nfc -> variant )
845
845
return - ENODEV ;
846
846
847
- nfc -> variant = (uintptr_t )of_id -> data ;
848
-
849
847
for_each_available_child_of_node (nfc -> dev -> of_node , child ) {
850
848
if (of_device_is_compatible (child , "fsl,vf610-nfc-nandcs" )) {
851
849
You can’t perform that action at this time.
0 commit comments