diff options
author | Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | 2013-06-18 11:21:19 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-06-20 17:18:01 +0200 |
commit | 905f3ee7fb79af91ed42275c995ca0cd04a2a3d6 (patch) | |
tree | e0fedd24976a5d6bd008034dc968dd0a8fa8cc19 /drivers/spi | |
parent | 03e0e78bf6b436d9e52c97ddfa9dec7a11f9b67b (diff) | |
download | barebox-905f3ee7fb79af91ed42275c995ca0cd04a2a3d6.tar.gz barebox-905f3ee7fb79af91ed42275c995ca0cd04a2a3d6.tar.xz |
OF: base: sync of_find_property with linux OF API
To start synchronizing OF API of barebox with linux OF API, this adds
a length pointer to of_find_property. Also all current users of that
function are updated to reflect the API change.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index f460a7a690..eebf64c980 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -112,17 +112,17 @@ void spi_of_register_slaves(struct spi_master *master, struct device_node *node) chip.name = xstrdup(n->name); chip.bus_num = master->bus_num; /* Mode (clock phase/polarity/etc.) */ - if (of_find_property(n, "spi-cpha")) + if (of_find_property(n, "spi-cpha", NULL)) chip.mode |= SPI_CPHA; - if (of_find_property(n, "spi-cpol")) + if (of_find_property(n, "spi-cpol", NULL)) chip.mode |= SPI_CPOL; - if (of_find_property(n, "spi-cs-high")) + if (of_find_property(n, "spi-cs-high", NULL)) chip.mode |= SPI_CS_HIGH; - if (of_find_property(n, "spi-3wire")) + if (of_find_property(n, "spi-3wire", NULL)) chip.mode |= SPI_3WIRE; of_property_read_u32(n, "spi-max-frequency", &chip.max_speed_hz); - reg = of_find_property(n, "reg"); + reg = of_find_property(n, "reg", NULL); if (!reg) continue; chip.chip_select = of_read_number(reg->value, 1); |