]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
of: mtd: nuke useless const qualifier
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Tue, 10 Jul 2012 13:35:50 +0000 (13:35 +0000)
committerRob Herring <rob.herring@calxeda.com>
Tue, 10 Jul 2012 15:32:06 +0000 (10:32 -0500)
This patch does the following:
 -const int of_get_nand_ecc_mode(struct device_node *np)
 +int of_get_nand_ecc_mode(struct device_node *np)

because:
1. it is probably just a typo?
2. it causes warnings like this when people assing the returned
   value to an 'int' variable:
   include/linux/of_mtd.h:14:18: warning: type qualifiers ignored on functi=
on return type [-Wignored-qualifiers]

Remove also the unnecessary "extern" qualifier to be consistent with other
declarations in this file.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
drivers/of/of_mtd.c
include/linux/of_mtd.h

index e7cad627a5d1bc9ae0ca5ff6685665526b2ffc77..a27ec94877e4de2efbdb84db2427672e2e809bd8 100644 (file)
@@ -32,7 +32,7 @@ static const char *nand_ecc_modes[] = {
  * The function gets ecc mode string from property 'nand-ecc-mode',
  * and return its index in nand_ecc_modes table, or errno in error case.
  */
-const int of_get_nand_ecc_mode(struct device_node *np)
+int of_get_nand_ecc_mode(struct device_node *np)
 {
        const char *pm;
        int err, i;
index bae1b6094c63bfa82106614116565fa83aece525..ed7f267e63897794773ee201e32ad01d89d7bd7d 100644 (file)
@@ -11,7 +11,7 @@
 
 #ifdef CONFIG_OF_MTD
 #include <linux/of.h>
-extern const int of_get_nand_ecc_mode(struct device_node *np);
+int of_get_nand_ecc_mode(struct device_node *np);
 int of_get_nand_bus_width(struct device_node *np);
 bool of_get_nand_on_flash_bbt(struct device_node *np);
 #endif