diff options
author | John Crispin <blogic@openwrt.org> | 2012-04-16 12:31:48 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2012-04-16 12:31:48 +0000 |
commit | b9f03a5a14decfc1677b365842e8172bf7d6ec68 (patch) | |
tree | ea843226cf79615ad18e5b50255de68e0116d0c4 /target/linux/lantiq/patches-3.3/0041-MTD-MIPS-lantiq-use-module_platform_driver-inside-la.patch | |
parent | b9a5bae5fbd6e0a0fdb1c4c0aec0cd2bfd4c7503 (diff) | |
download | upstream-b9f03a5a14decfc1677b365842e8172bf7d6ec68.tar.gz upstream-b9f03a5a14decfc1677b365842e8172bf7d6ec68.tar.bz2 upstream-b9f03a5a14decfc1677b365842e8172bf7d6ec68.zip |
[lantiq] adds 3.3 patches and files
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31307 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/lantiq/patches-3.3/0041-MTD-MIPS-lantiq-use-module_platform_driver-inside-la.patch')
-rw-r--r-- | target/linux/lantiq/patches-3.3/0041-MTD-MIPS-lantiq-use-module_platform_driver-inside-la.patch | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/target/linux/lantiq/patches-3.3/0041-MTD-MIPS-lantiq-use-module_platform_driver-inside-la.patch b/target/linux/lantiq/patches-3.3/0041-MTD-MIPS-lantiq-use-module_platform_driver-inside-la.patch new file mode 100644 index 0000000000..28a20f4235 --- /dev/null +++ b/target/linux/lantiq/patches-3.3/0041-MTD-MIPS-lantiq-use-module_platform_driver-inside-la.patch @@ -0,0 +1,64 @@ +From 94ca79b8bd9bf8ec5dcd993e0f004056f12f16f4 Mon Sep 17 00:00:00 2001 +From: John Crispin <blogic@openwrt.org> +Date: Mon, 20 Feb 2012 12:15:25 +0100 +Subject: [PATCH 41/70] MTD: MIPS: lantiq: use module_platform_driver inside + lantiq map driver + +Reduce boilerplate code by converting driver to module_platform_driver. + +Signed-off-by: John Crispin <blogic@openwrt.org> +Cc: linux-mtd@lists.infradead.org +--- + drivers/mtd/maps/lantiq-flash.c | 22 +++------------------- + 1 files changed, 3 insertions(+), 19 deletions(-) + +diff --git a/drivers/mtd/maps/lantiq-flash.c b/drivers/mtd/maps/lantiq-flash.c +index cf7a3cd..ccc6954 100644 +--- a/drivers/mtd/maps/lantiq-flash.c ++++ b/drivers/mtd/maps/lantiq-flash.c +@@ -108,7 +108,7 @@ ltq_copy_to(struct map_info *map, unsigned long to, + spin_unlock_irqrestore(&ebu_lock, flags); + } + +-static int __init ++static int __devinit + ltq_mtd_probe(struct platform_device *pdev) + { + struct physmap_flash_data *ltq_mtd_data = dev_get_platdata(&pdev->dev); +@@ -204,6 +204,7 @@ ltq_mtd_remove(struct platform_device *pdev) + } + + static struct platform_driver ltq_mtd_driver = { ++ .probe = ltq_mtd_probe, + .remove = __devexit_p(ltq_mtd_remove), + .driver = { + .name = "ltq_nor", +@@ -211,24 +212,7 @@ static struct platform_driver ltq_mtd_driver = { + }, + }; + +-static int __init +-init_ltq_mtd(void) +-{ +- int ret = platform_driver_probe(<q_mtd_driver, ltq_mtd_probe); +- +- if (ret) +- pr_err("ltq_nor: error registering platform driver"); +- return ret; +-} +- +-static void __exit +-exit_ltq_mtd(void) +-{ +- platform_driver_unregister(<q_mtd_driver); +-} +- +-module_init(init_ltq_mtd); +-module_exit(exit_ltq_mtd); ++module_platform_driver(ltq_mtd_driver); + + MODULE_LICENSE("GPL"); + MODULE_AUTHOR("John Crispin <blogic@openwrt.org>"); +-- +1.7.9.1 + |