uio: Convert to using %pOFn instead of device_node.name
authorRob Herring <robh@kernel.org>
Tue, 28 Aug 2018 01:52:48 +0000 (20:52 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Sep 2018 07:46:46 +0000 (09:46 +0200)
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/uio/uio_fsl_elbc_gpcm.c

index bbc17effae5e051786c5a2b403660c1aa0d31dc2..9cc37fe07d35a3471c2f847a155a04f09d70bf4c 100644 (file)
@@ -382,8 +382,7 @@ static int uio_fsl_elbc_gpcm_probe(struct platform_device *pdev)
        }
 
        /* set all UIO data */
-       if (node->name)
-               info->mem[0].name = kstrdup(node->name, GFP_KERNEL);
+       info->mem[0].name = kasprintf(GFP_KERNEL, "%pOFn", node);
        info->mem[0].addr = res.start;
        info->mem[0].size = resource_size(&res);
        info->mem[0].memtype = UIO_MEM_PHYS;