+13
drivers/of/unittest-data/tests-platform.dtsi
+13
drivers/of/unittest-data/tests-platform.dtsi
+14
drivers/of/unittest.c
+14
drivers/of/unittest.c
···
1380
1380
static void __init of_unittest_reg(void)
1381
1381
{
1382
1382
struct device_node *np;
1383
+
struct resource res;
1383
1384
int ret;
1384
1385
u64 addr, size;
1385
1386
···
1397
1396
np, addr);
1398
1397
1399
1398
of_node_put(np);
1399
+
1400
+
np = of_find_node_by_path("/testcase-data/platform-tests-2/node/test-device@100");
1401
+
if (!np) {
1402
+
pr_err("missing testcase data\n");
1403
+
return;
1404
+
}
1405
+
1406
+
ret = of_address_to_resource(np, 0, &res);
1407
+
unittest(ret == -EINVAL, "of_address_to_resource(%pOF) expected error on untranslatable address\n",
1408
+
np);
1409
+
1410
+
of_node_put(np);
1411
+
1400
1412
}
1401
1413
1402
1414
struct of_unittest_expected_res {