of: Use PLATFORM_DEVID_NONE definition
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 25 Aug 2017 15:33:13 +0000 (18:33 +0300)
committerRob Herring <robh@kernel.org>
Fri, 25 Aug 2017 15:50:31 +0000 (10:50 -0500)
Use dedicated definition instead of plain -1 where it's appropriate.

No functional change intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/device.c
drivers/of/platform.c

index 11a17582e56837a472f3952849adc294ce01f978..af31e6b9ac7491771e32c5cb03da0fb378e82095 100644 (file)
@@ -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
index 683b2e74bef73b09a2a0f4e604e442c11e91a2d7..ac15d0e3d27d3b16794f427d72d0b89890909ec2 100644 (file)
@@ -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;