Ticket #99: fr.it87spi.clean.patch

File fr.it87spi.clean.patch, 0.8 KB (added by stuge, 5 months ago)
  • it87spi.c

    flashrom: Small cleanup, big readability improvement
    
    Signed-off-by: Peter Stuge <peter@stuge.se>
    
     
    113113int it87xx_probe_spi_flash(const char *name) 
    114114{ 
    115115        it8716f_flashport = find_ite_spi_flash_port(ITE_SUPERIO_PORT1); 
    116  
    117         if (!it8716f_flashport) 
     116        if (!it8716f_flashport) { 
    118117                it8716f_flashport = find_ite_spi_flash_port(ITE_SUPERIO_PORT2); 
     118                if (!it8716f_flashport) 
     119                        return 1; 
     120        } 
    119121 
    120         if (it8716f_flashport) 
    121                 flashbus = BUS_TYPE_IT87XX_SPI; 
    122  
    123         return (!it8716f_flashport); 
     122        flashbus = BUS_TYPE_IT87XX_SPI; 
     123        return 0; 
    124124} 
    125125 
    126126/* The IT8716F only supports commands with length 1,2,4,5 bytes including