File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030#include <linux/slab.h>
3131#include <linux/device.h>
3232#include <linux/platform_device.h>
33+ #include <linux/property.h>
3334#include <linux/mtd/mtd.h>
3435#include <linux/mtd/map.h>
3536#include <linux/mtd/partitions.h>
3637#include <linux/mtd/physmap.h>
3738#include <linux/mtd/concat.h>
3839#include <linux/mtd/cfi_endian.h>
3940#include <linux/io.h>
40- #include <linux/of_device .h>
41+ #include <linux/of .h>
4142#include <linux/pm_runtime.h>
4243#include <linux/gpio/consumer.h>
4344
@@ -295,14 +296,9 @@ static const char * const *of_get_part_probes(struct platform_device *dev)
295296static const char * of_select_probe_type (struct platform_device * dev )
296297{
297298 struct device_node * dp = dev -> dev .of_node ;
298- const struct of_device_id * match ;
299299 const char * probe_type ;
300300
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 );
306302 if (probe_type )
307303 return probe_type ;
308304
Original file line number Diff line number Diff line change 1515#include <linux/module.h>
1616#include <linux/mtd/mtd.h>
1717#include <linux/mtd/rawnand.h>
18- #include <linux/of_device.h>
1918#include <linux/iopoll.h>
19+ #include <linux/of.h>
20+ #include <linux/platform_device.h>
21+ #include <linux/property.h>
2022#include <linux/slab.h>
2123
2224/*
@@ -2995,15 +2997,11 @@ static int cadence_nand_dt_probe(struct platform_device *ofdev)
29952997 struct cadence_nand_dt * dt ;
29962998 struct cdns_nand_ctrl * cdns_ctrl ;
29972999 int ret ;
2998- const struct of_device_id * of_id ;
29993000 const struct cadence_nand_dt_devdata * devdata ;
30003001 u32 val ;
30013002
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 ) {
30073005 pr_err ("Failed to find the right device id.\n" );
30083006 return - ENOMEM ;
30093007 }
Original file line number Diff line number Diff line change 2929#include <linux/mtd/mtd.h>
3030#include <linux/mtd/rawnand.h>
3131#include <linux/mtd/partitions.h>
32- #include <linux/of_device .h>
32+ #include <linux/of .h>
3333#include <linux/platform_device.h>
34+ #include <linux/property.h>
3435#include <linux/slab.h>
3536#include <linux/swab.h>
3637
@@ -810,7 +811,6 @@ static int vf610_nfc_probe(struct platform_device *pdev)
810811 struct mtd_info * mtd ;
811812 struct nand_chip * chip ;
812813 struct device_node * child ;
813- const struct of_device_id * of_id ;
814814 int err ;
815815 int irq ;
816816
@@ -840,12 +840,10 @@ static int vf610_nfc_probe(struct platform_device *pdev)
840840 return PTR_ERR (nfc -> clk );
841841 }
842842
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 )
845845 return - ENODEV ;
846846
847- nfc -> variant = (uintptr_t )of_id -> data ;
848-
849847 for_each_available_child_of_node (nfc -> dev -> of_node , child ) {
850848 if (of_device_is_compatible (child , "fsl,vf610-nfc-nandcs" )) {
851849
You can’t perform that action at this time.
0 commit comments