source: trunk/target/linux/generic/patches-2.6.34/920-01-hotpluggable-spi-gpio.patch @ 21952

Last change on this file since 21952 was 21952, checked in by nbd, 6 years ago

rename target/linux/generic-2.6 to generic

File size: 1.5 KB
  • drivers/spi/spi_gpio.c

    Fix spi-gpio for hotplug.
    
    --mb
    
    
    
    a b static void spi_gpio_cleanup(struct spi_ 
    218218        spi_bitbang_cleanup(spi); 
    219219} 
    220220 
    221 static int __init spi_gpio_alloc(unsigned pin, const char *label, bool is_in) 
     221static int __devinit spi_gpio_alloc(unsigned pin, const char *label, bool is_in) 
    222222{ 
    223223        int value; 
    224224 
    static int __init spi_gpio_alloc(unsigne 
    232232        return value; 
    233233} 
    234234 
    235 static int __init 
     235static int __devinit 
    236236spi_gpio_request(struct spi_gpio_platform_data *pdata, const char *label) 
    237237{ 
    238238        int value; 
    done: 
    261261        return value; 
    262262} 
    263263 
    264 static int __init spi_gpio_probe(struct platform_device *pdev) 
     264static int __devinit spi_gpio_probe(struct platform_device *pdev) 
    265265{ 
    266266        int                             status; 
    267267        struct spi_master               *master; 
    gpio_free: 
    317317        return status; 
    318318} 
    319319 
    320 static int __exit spi_gpio_remove(struct platform_device *pdev) 
     320static int __devexit spi_gpio_remove(struct platform_device *pdev) 
    321321{ 
    322322        struct spi_gpio                 *spi_gpio; 
    323323        struct spi_gpio_platform_data   *pdata; 
    MODULE_ALIAS("platform:" DRIVER_NAME); 
    344344static struct platform_driver spi_gpio_driver = { 
    345345        .driver.name    = DRIVER_NAME, 
    346346        .driver.owner   = THIS_MODULE, 
    347         .remove         = __exit_p(spi_gpio_remove), 
     347        .probe          = spi_gpio_probe, 
     348        .remove         = __devexit_p(spi_gpio_remove), 
    348349}; 
    349350 
    350351static int __init spi_gpio_init(void) 
    351352{ 
    352         return platform_driver_probe(&spi_gpio_driver, spi_gpio_probe); 
     353        return platform_driver_register(&spi_gpio_driver); 
    353354} 
    354355module_init(spi_gpio_init); 
    355356 
Note: See TracBrowser for help on using the repository browser.