From 6d7e3bf8d12c0ae8b297de428e67301df1b95c5f Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Fri, 25 Aug 2017 18:33:13 +0300 Subject: [PATCH] of: Use PLATFORM_DEVID_NONE definition Use dedicated definition instead of plain -1 where it's appropriate. No functional change intended. Signed-off-by: Andy Shevchenko Signed-off-by: Rob Herring --- drivers/of/device.c | 2 +- drivers/of/platform.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/of/device.c b/drivers/of/device.c index 11a17582e568..af31e6b9ac74 100644 --- a/drivers/of/device.c +++ b/drivers/of/device.c @@ -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 diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 683b2e74bef7..ac15d0e3d27d 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -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; -- 2.20.1