]> git.baikalelectronics.ru Git - kernel.git/commit
rfkill: Use switch to demux userspace operations
authorJoão Paulo Rechi Vita <jprvita@gmail.com>
Mon, 22 Feb 2016 16:36:39 +0000 (11:36 -0500)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 5 Apr 2016 08:48:53 +0000 (10:48 +0200)
commit9d610142938430ef834bd76d34a61668f364c237
tree91599c316608ab816cde1e505bb07dbd41ec2a0f
parente33b1f7ea03da4c8489a412aa5f181624539515b
rfkill: Use switch to demux userspace operations

Using a switch to handle different ev.op values in rfkill_fop_write()
makes the code easier to extend, as out-of-range values can always be
handled by the default case.

Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com>
[roll in fix for RFKILL_OP_CHANGE from Jouni]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/rfkill/core.c