Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 29c990df authored by Rob Herring's avatar Rob Herring Committed by David S. Miller
Browse files

sparc: Use of_node_name_eq for node name comparisons



Convert string compares of DT node names to use of_node_name_eq helper
instead. This removes direct access to the node name pointer.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ead1c2bd
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -528,9 +528,9 @@ static int sun_pci_fd_test_drive(unsigned long port, int drive)

static int __init ebus_fdthree_p(struct device_node *dp)
{
	if (!strcmp(dp->name, "fdthree"))
	if (of_node_name_eq(dp, "fdthree"))
		return 1;
	if (!strcmp(dp->name, "floppy")) {
	if (of_node_name_eq(dp, "floppy")) {
		const char *compat;

		compat = of_get_property(dp, "compatible", NULL);
@@ -555,7 +555,7 @@ static unsigned long __init sun_floppy_init(void)
	op = NULL;

	for_each_node_by_name(dp, "SUNW,fdtwo") {
		if (strcmp(dp->parent->name, "sbus"))
		if (!of_node_name_eq(dp->parent, "sbus"))
			continue;
		op = of_find_device_by_node(dp);
		if (op)
@@ -656,7 +656,7 @@ static unsigned long __init sun_floppy_init(void)
		 */
		config = 0;
		for (dp = ebus_dp->child; dp; dp = dp->sibling) {
			if (!strcmp(dp->name, "ecpp")) {
			if (of_node_name_eq(dp, "ecpp")) {
				struct platform_device *ecpp_op;

				ecpp_op = of_find_device_by_node(dp);
+1 −1
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ static int ecpp_probe(struct platform_device *op)
	int slot, err;

	parent = op->dev.of_node->parent;
	if (!strcmp(parent->name, "dma")) {
	if (of_node_name_eq(parent, "dma")) {
		p = parport_pc_probe_port(base, base + 0x400,
					  op->archdata.irqs[0], PARPORT_DMA_NOFIFO,
					  op->dev.parent->parent, 0);
+2 −2
Original line number Diff line number Diff line
@@ -108,10 +108,10 @@ static int auxio_probe(struct platform_device *dev)
	struct device_node *dp = dev->dev.of_node;
	unsigned long size;

	if (!strcmp(dp->parent->name, "ebus")) {
	if (of_node_name_eq(dp->parent, "ebus")) {
		auxio_devtype = AUXIO_TYPE_EBUS;
		size = sizeof(u32);
	} else if (!strcmp(dp->parent->name, "sbus")) {
	} else if (of_node_name_eq(dp->parent, "sbus")) {
		auxio_devtype = AUXIO_TYPE_SBUS;
		size = 1;
	} else {
+1 −1
Original line number Diff line number Diff line
@@ -168,7 +168,7 @@ static int fhc_probe(struct platform_device *op)
		goto out;
	}

	if (!strcmp(op->dev.of_node->parent->name, "central"))
	if (of_node_name_eq(op->dev.of_node->parent, "central"))
		p->central = true;

	p->pregs = of_ioremap(&op->resource[0], 0,
+1 −1
Original line number Diff line number Diff line
@@ -915,7 +915,7 @@ static void map_prom_timers(void)
	dp = of_find_node_by_path("/");
	dp = dp->child;
	while (dp) {
		if (!strcmp(dp->name, "counter-timer"))
		if (of_node_name_eq(dp, "counter-timer"))
			break;
		dp = dp->sibling;
	}
Loading