Declare all read only data structures as const

By analysing objdump output some read only structures were found in
.data section. To help compiler further optimize code declare these
as const.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
This commit is contained in:
Mikael Kanstrup 2015-04-24 09:19:53 +02:00 committed by Jouni Malinen
parent fd4fb28179
commit 8b423edbd3
32 changed files with 93 additions and 92 deletions

View file

@ -4640,6 +4640,6 @@ wpa_get_wowlan_triggers(const char *wowlan_triggers,
const struct wpa_driver_capa *capa);
/* NULL terminated array of linked in driver wrappers */
extern struct wpa_driver_ops *wpa_drivers[];
extern const struct wpa_driver_ops *const wpa_drivers[];
#endif /* DRIVER_H */

View file

@ -743,7 +743,7 @@ struct wpa_driver_ops wpa_driver_privsep_ops = {
};
struct wpa_driver_ops *wpa_drivers[] =
const struct wpa_driver_ops *const wpa_drivers[] =
{
&wpa_driver_privsep_ops,
NULL

View file

@ -47,7 +47,7 @@ extern struct wpa_driver_ops wpa_driver_none_ops; /* driver_none.c */
#endif /* CONFIG_DRIVER_NONE */
struct wpa_driver_ops *wpa_drivers[] =
const struct wpa_driver_ops *const wpa_drivers[] =
{
#ifdef CONFIG_DRIVER_NL80211
&wpa_driver_nl80211_ops,