]> git.baikalelectronics.ru Git - kernel.git/commit
iwlegacy: make il3945_mac_ops __ro_after_init
authorJohannes Berg <johannes.berg@intel.com>
Wed, 7 Dec 2016 06:36:46 +0000 (07:36 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 30 Dec 2016 11:28:40 +0000 (13:28 +0200)
commit770e13aaf02311bcf33f56e8ad98d6897b889976
treead0d64f9ba1b72229728ba204815fb260f24b2fb
parent222c1653b27539976091fd78f38611149c9898d5
iwlegacy: make il3945_mac_ops __ro_after_init

There's no need for this to be only __read_mostly, since
it's only written in a single way depending on the module
parameter, so that can be moved into the module's __init
function, and the ops can be __ro_after_init.

This is a little bit safer since it means the ops can't
be overwritten (accidentally or otherwise), which would
otherwise cause an arbitrary function or bad pointer to
be called.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/intel/iwlegacy/3945-mac.c