Skip to contentSkip to conversation

of: Use PLATFORM_DEVID_NONE definition

PATCH Applied Andy Shevchenko 2 participants 2 messages Aug 25, 2017 1 message not in the archive Device tree

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 of: Use PLATFORM_DEVID_NONE definition

Use dedicated definition instead of plain -1 where it's appropriate.

No functional change intended.

---
 drivers/of/device.c   | 2 +-
 drivers/of/platform.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/of/device.c +1 -1
index 6f33a0e0d351..8963ec8ea96f 100644
@@ -58,7 +58,7 @@ int of_device_add(struct platform_device *ofdev)
 	/* name and id have to be set so that the platform bus doesn't get
 	 * confused on matching */
 	ofdev->name = dev_name(&ofdev->dev);
-	ofdev->id = -1;
+	ofdev->id = PLATFORM_DEVID_NONE;
 
 	/*
 	 * If this device has not binding numa node in devicetree, that is
drivers/of/platform.c +1 -1
index 683b2e74bef7..ac15d0e3d27d 100644
@@ -118,7 +118,7 @@ struct platform_device *of_device_alloc(struct device_node *np,
 	int rc, i, num_reg = 0, num_irq;
 	struct resource *res, temp_res;
 
-	dev = platform_device_alloc("", -1);
+	dev = platform_device_alloc("", PLATFORM_DEVID_NONE);
 	if (!dev)
 		return NULL;
 
Signature · 6 lines
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Applied
#2 lore raw
In reply to a message not in the archive
Quoted 9 lines · Andy Shevchenko

Use dedicated definition instead of plain -1 where it's appropriate.

No functional change intended.

---
 drivers/of/device.c   | 2 +-
 drivers/of/platform.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html