Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: n2 - Use of_property_read_reg() to parse "reg"

Use the recently added of_property_read_reg() helper to get the
untranslated "reg" address value.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Rob Herring and committed by
Herbert Xu
ee174e26 2382b5ae

+4 -5
+4 -5
drivers/crypto/n2_core.c
··· 9 9 #include <linux/kernel.h> 10 10 #include <linux/module.h> 11 11 #include <linux/of.h> 12 + #include <linux/of_address.h> 12 13 #include <linux/of_device.h> 13 14 #include <linux/cpumask.h> 14 15 #include <linux/slab.h> ··· 1796 1795 struct spu_mdesc_info *ip, 1797 1796 const char *node_name) 1798 1797 { 1799 - const unsigned int *reg; 1800 - u64 node; 1798 + u64 node, reg; 1801 1799 1802 - reg = of_get_property(dev->dev.of_node, "reg", NULL); 1803 - if (!reg) 1800 + if (of_property_read_reg(dev->dev.of_node, 0, &reg, NULL) < 0) 1804 1801 return -ENODEV; 1805 1802 1806 1803 mdesc_for_each_node_by_name(mdesc, node, "virtual-device") { ··· 1809 1810 if (!name || strcmp(name, node_name)) 1810 1811 continue; 1811 1812 chdl = mdesc_get_property(mdesc, node, "cfg-handle", NULL); 1812 - if (!chdl || (*chdl != *reg)) 1813 + if (!chdl || (*chdl != reg)) 1813 1814 continue; 1814 1815 ip->cfg_handle = *chdl; 1815 1816 return get_irq_props(mdesc, node, ip);