discover: simplify handler switch statement
authorJeremy Kerr <jk@ozlabs.org>
Tue, 5 Mar 2013 05:49:15 +0000 (13:49 +0800)
committerGeoff Levand <geoff@infradead.org>
Tue, 5 Mar 2013 14:06:17 +0000 (06:06 -0800)
commit0fdc5cc3f296db134729fe58e074c20084b99459
tree097c3d31633d6588416fd56873ab869633ff23e6
parent6d51866f409e90274ff8cfb06b92a6c828692698
discover: simplify handler switch statement

Instead of using nested switch statements in device_handler_event,
define an array of handlers, and lookup instead.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>
discover/device-handler.c
discover/event.h