drm/radeon: don't poll tv dac if crtc2 is in use.
[safe/jmp/linux-2.6] / drivers / of / of_spi.c
index b01eec0..5fed7e3 100644 (file)
@@ -23,7 +23,7 @@ void of_register_spi_devices(struct spi_master *master, struct device_node *np)
 {
        struct spi_device *spi;
        struct device_node *nc;
-       const u32 *prop;
+       const __be32 *prop;
        int rc;
        int len;
 
@@ -54,13 +54,15 @@ void of_register_spi_devices(struct spi_master *master, struct device_node *np)
                        spi_dev_put(spi);
                        continue;
                }
-               spi->chip_select = *prop;
+               spi->chip_select = be32_to_cpup(prop);
 
                /* Mode (clock phase/polarity/etc.) */
                if (of_find_property(nc, "spi-cpha", NULL))
                        spi->mode |= SPI_CPHA;
                if (of_find_property(nc, "spi-cpol", NULL))
                        spi->mode |= SPI_CPOL;
+               if (of_find_property(nc, "spi-cs-high", NULL))
+                       spi->mode |= SPI_CS_HIGH;
 
                /* Device speed */
                prop = of_get_property(nc, "spi-max-frequency", &len);
@@ -70,14 +72,14 @@ void of_register_spi_devices(struct spi_master *master, struct device_node *np)
                        spi_dev_put(spi);
                        continue;
                }
-               spi->max_speed_hz = *prop;
+               spi->max_speed_hz = be32_to_cpup(prop);
 
                /* IRQ */
                spi->irq = irq_of_parse_and_map(nc, 0);
 
                /* Store a pointer to the node in the device structure */
                of_node_get(nc);
-               spi->dev.archdata.of_node = nc;
+               spi->dev.of_node = nc;
 
                /* Register the new device */
                request_module(spi->modalias);