Changeset 42490


Ignore:
Timestamp:
2014-09-12T08:51:51+02:00 (3 years ago)
Author:
blogic
Message:

atheros: ar2315-spiflash: update initialization

  • fill module metadata
    • remove odd module_{init,exit}

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/atheros/patches-3.14/120-spiflash.patch

    r42489 r42490  
    2424--- /dev/null 
    2525+++ b/drivers/mtd/devices/ar2315.c 
    26 @@ -0,0 +1,518 @@ 
     26@@ -0,0 +1,507 @@ 
    2727+ 
    2828+/* 
     
    5757+#include "ar2315_spiflash.h" 
    5858+ 
    59 + 
    60 +#define SPIFLASH "spiflash: " 
     59+#define DRIVER_NAME "ar2315-spiflash" 
     60+ 
    6161+#define busy_wait(_priv, _condition, _wait) do { \ 
    6262+       while (_condition) { \ 
     
    228228+ */ 
    229229+static int 
    230 +spiflash_probe_chip(struct spiflash_priv *priv) 
     230+spiflash_probe_chip(struct platform_device *pdev, struct spiflash_priv *priv) 
    231231+{ 
    232232+       u32 sig; 
     
    255255+               break; 
    256256+       default: 
    257 +               pr_warn(SPIFLASH "Read of flash device signature failed!\n"); 
     257+               dev_warn(&pdev->dev, "read of flash device signature failed!\n"); 
    258258+               return 0; 
    259259+       } 
     
    469469+       } 
    470470+ 
    471 +       index = spiflash_probe_chip(priv); 
     471+       index = spiflash_probe_chip(pdev, priv); 
    472472+       if (!index) { 
    473 +               dev_warn(&pdev->dev, SPIFLASH "Found no flash device\n"); 
     473+               dev_warn(&pdev->dev, "found no flash device\n"); 
    474474+               return -ENODEV; 
    475475+       } 
     
    519519+ 
    520520+static struct platform_driver spiflash_driver = { 
    521 +       .driver.name = "ar2315-spiflash", 
     521+       .driver.name = DRIVER_NAME, 
    522522+       .probe = spiflash_probe, 
    523523+       .remove = spiflash_remove, 
    524524+}; 
    525525+ 
    526 +static int __init 
    527 +spiflash_init(void) 
    528 +{ 
    529 +       return platform_driver_register(&spiflash_driver); 
    530 +} 
    531 + 
    532 +static void __exit 
    533 +spiflash_exit(void) 
    534 +{ 
    535 +       return platform_driver_unregister(&spiflash_driver); 
    536 +} 
    537 + 
    538 +module_init(spiflash_init); 
    539 +module_exit(spiflash_exit); 
     526+module_platform_driver(spiflash_driver); 
    540527+ 
    541528+MODULE_LICENSE("GPL"); 
    542 +MODULE_AUTHOR("OpenWrt.org, Atheros Communications Inc"); 
    543 +MODULE_DESCRIPTION("MTD driver for SPI Flash on Atheros SOC"); 
     529+MODULE_AUTHOR("OpenWrt.org"); 
     530+MODULE_AUTHOR("Atheros Communications Inc"); 
     531+MODULE_DESCRIPTION("MTD driver for SPI Flash on Atheros AR2315+ SOC"); 
     532+MODULE_ALIAS("platform:" DRIVER_NAME); 
    544533+ 
    545534--- /dev/null 
Note: See TracChangeset for help on using the changeset viewer.