]> git.baikalelectronics.ru Git - kernel.git/commit
rfkill: detect bogus double-registering (v2)
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sat, 2 Aug 2008 18:10:57 +0000 (15:10 -0300)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 22 Aug 2008 20:29:56 +0000 (16:29 -0400)
commit1b3b2f842e10c865b92dd8096ef57543e12b7108
tree24650fdd0e2a0ad8145693164fa27e847379aacc
parent46d9ea561f8bc186e82b8af027b58ae55545a06c
rfkill: detect bogus double-registering (v2)

Detect and abort with -EEXIST if rfkill_register is called twice on the
same rfkill struct.  And WARN_ON(it) for good measure.

While at it, flag when we are adding the first switch of a type, we will
need that information later.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/rfkill/rfkill.c