@@ -1229,45 +1229,4 @@ bool is_nvdimm_sync(struct nd_region *nd_region)
12291229}
12301230EXPORT_SYMBOL_GPL (is_nvdimm_sync );
12311231
1232- struct conflict_context {
1233- struct nd_region * nd_region ;
1234- resource_size_t start , size ;
1235- };
1236-
1237- static int region_conflict (struct device * dev , void * data )
1238- {
1239- struct nd_region * nd_region ;
1240- struct conflict_context * ctx = data ;
1241- resource_size_t res_end , region_end , region_start ;
1242-
1243- if (!is_memory (dev ))
1244- return 0 ;
1245-
1246- nd_region = to_nd_region (dev );
1247- if (nd_region == ctx -> nd_region )
1248- return 0 ;
1249-
1250- res_end = ctx -> start + ctx -> size ;
1251- region_start = nd_region -> ndr_start ;
1252- region_end = region_start + nd_region -> ndr_size ;
1253- if (ctx -> start >= region_start && ctx -> start < region_end )
1254- return - EBUSY ;
1255- if (res_end > region_start && res_end <= region_end )
1256- return - EBUSY ;
1257- return 0 ;
1258- }
1259-
1260- int nd_region_conflict (struct nd_region * nd_region , resource_size_t start ,
1261- resource_size_t size )
1262- {
1263- struct nvdimm_bus * nvdimm_bus = walk_to_nvdimm_bus (& nd_region -> dev );
1264- struct conflict_context ctx = {
1265- .nd_region = nd_region ,
1266- .start = start ,
1267- .size = size ,
1268- };
1269-
1270- return device_for_each_child (& nvdimm_bus -> dev , & ctx , region_conflict );
1271- }
1272-
12731232MODULE_IMPORT_NS ("DEVMEM" );
0 commit comments