Skip to content

Commit 8ce5f84

Browse files
committed
of: Remove struct device_node.type pointer
Now that all users of device_node.type pointer have been removed in favor of accessor functions, we can remove it. Cc: Frank Rowand <frowand.list@gmail.com> Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring <robh@kernel.org>
1 parent bfeffd1 commit 8ce5f84

File tree

5 files changed

+0
-12
lines changed

5 files changed

+0
-12
lines changed

drivers/of/dynamic.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,8 @@ static void __of_attach_node(struct device_node *np)
207207

208208
if (!of_node_check_flag(np, OF_OVERLAY)) {
209209
np->name = __of_get_property(np, "name", NULL);
210-
np->type = __of_get_property(np, "device_type", NULL);
211210
if (!np->name)
212211
np->name = "<NULL>";
213-
if (!np->type)
214-
np->type = "<NULL>";
215212

216213
phandle = __of_get_property(np, "phandle", &sz);
217214
if (!phandle)

drivers/of/fdt.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,12 +314,8 @@ static bool populate_node(const void *blob,
314314
populate_properties(blob, offset, mem, np, pathp, dryrun);
315315
if (!dryrun) {
316316
np->name = of_get_property(np, "name", NULL);
317-
np->type = of_get_property(np, "device_type", NULL);
318-
319317
if (!np->name)
320318
np->name = "<NULL>";
321-
if (!np->type)
322-
np->type = "<NULL>";
323319
}
324320

325321
*pnp = np;

drivers/of/overlay.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,12 +423,9 @@ static int add_changeset_node(struct overlay_changeset *ovcs,
423423

424424
tchild->parent = target->np;
425425
tchild->name = __of_get_property(node, "name", NULL);
426-
tchild->type = __of_get_property(node, "device_type", NULL);
427426

428427
if (!tchild->name)
429428
tchild->name = "<NULL>";
430-
if (!tchild->type)
431-
tchild->type = "<NULL>";
432429

433430
/* ignore obsolete "linux,phandle" */
434431
phandle = __of_get_property(node, "phandle", &size);

drivers/of/pdt.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ static struct device_node * __init of_pdt_create_node(phandle node,
155155
dp->parent = parent;
156156

157157
dp->name = of_pdt_get_one_property(node, "name");
158-
dp->type = of_pdt_get_one_property(node, "device_type");
159158
dp->phandle = node;
160159

161160
dp->properties = of_pdt_build_prop_list(node);

include/linux/of.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ struct of_irq_controller;
5050

5151
struct device_node {
5252
const char *name;
53-
const char *type;
5453
phandle phandle;
5554
const char *full_name;
5655
struct fwnode_handle fwnode;

0 commit comments

Comments
 (0)