Date:2009-12-01 07:55:11 (10 years 6 months ago)
Author:xiangfu
Commit:88aa90462632abe27812b7f47fa333b48019dfc5
Message:400-spi-gpio-3wire.patch

Files: drivers/spi/spi_gpio.c (3 diffs)

Change Details

drivers/spi/spi_gpio.c
254254    if (value)
255255        goto done;
256256
257    value = spi_gpio_alloc(SPI_MISO_GPIO, label, true);
258    if (value)
259        goto free_mosi;
257    if (SPI_MISO_GPIO != SPI_MOSI_GPIO) {
258        value = spi_gpio_alloc(SPI_MISO_GPIO, label, true);
259        if (value)
260            goto free_mosi;
261    }
260262
261263    value = spi_gpio_alloc(SPI_SCK_GPIO, label, false);
262264    if (value)
...... 
319321    if (status < 0) {
320322        spi_master_put(spi_gpio->bitbang.master);
321323gpio_free:
322        gpio_free(SPI_MISO_GPIO);
324        if (SPI_MISO_GPIO != SPI_MOSI_GPIO)
325            gpio_free(SPI_MISO_GPIO);
323326        gpio_free(SPI_MOSI_GPIO);
324327        gpio_free(SPI_SCK_GPIO);
325328        spi_master_put(master);
...... 
343346
344347    platform_set_drvdata(pdev, NULL);
345348
346    gpio_free(SPI_MISO_GPIO);
349    if (SPI_MISO_GPIO != SPI_MOSI_GPIO)
350        gpio_free(SPI_MISO_GPIO);
347351    gpio_free(SPI_MOSI_GPIO);
348352    gpio_free(SPI_SCK_GPIO);
349353

Archive Download the corresponding diff file



interactive