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

spi: dw-mmio: convert to unified device property API

Convert the driver to use unfied device property API instead of OF one.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Andy Shevchenko and committed by
Mark Brown
9899995e 1c2df965

+3 -4
+3 -4
drivers/spi/spi-dw-mmio.c
··· 19 19 #include <linux/of.h> 20 20 #include <linux/of_gpio.h> 21 21 #include <linux/of_platform.h> 22 + #include <linux/property.h> 22 23 23 24 #include "spi-dw.h" 24 25 ··· 75 74 76 75 dws->max_freq = clk_get_rate(dwsmmio->clk); 77 76 78 - of_property_read_u32(pdev->dev.of_node, "reg-io-width", 79 - &dws->reg_io_width); 77 + device_property_read_u32(&pdev->dev, "reg-io-width", &dws->reg_io_width); 80 78 81 79 num_cs = 4; 82 80 83 - if (pdev->dev.of_node) 84 - of_property_read_u32(pdev->dev.of_node, "num-cs", &num_cs); 81 + device_property_read_u32(&pdev->dev, "num-cs", &num_cs); 85 82 86 83 dws->num_cs = num_cs; 87 84