提交 e95d8aaf 编写于 作者: A Artem Bityutskiy 提交者: Rob Herring

of: mtd: nuke useless const qualifier

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: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: NRob Herring <rob.herring@calxeda.com>
上级 74a7f084
...@@ -32,7 +32,7 @@ static const char *nand_ecc_modes[] = { ...@@ -32,7 +32,7 @@ static const char *nand_ecc_modes[] = {
* The function gets ecc mode string from property 'nand-ecc-mode', * 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. * 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; const char *pm;
int err, i; int err, i;
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#ifdef CONFIG_OF_MTD #ifdef CONFIG_OF_MTD
#include <linux/of.h> #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); int of_get_nand_bus_width(struct device_node *np);
bool of_get_nand_on_flash_bbt(struct device_node *np); bool of_get_nand_on_flash_bbt(struct device_node *np);
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册