Prechádzať zdrojové kódy

extcon: make extcon_info static const, fixes warning

The array extcon_info is read only, local to the source and does not
need to be in global scope, so make it static const.

Cleans up sparse warning:
symbol 'extcon_info' was not declared. Should it be static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Colin Ian King 8 rokov pred
rodič
commit
5183240cde
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      drivers/extcon/extcon.c

+ 1 - 1
drivers/extcon/extcon.c

@@ -36,7 +36,7 @@
 
 #define SUPPORTED_CABLE_MAX	32
 
-struct __extcon_info {
+static const struct __extcon_info {
 	unsigned int type;
 	unsigned int id;
 	const char *name;