serial-dmm: Save dmm_info struct in device contect
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>
Tue, 11 Dec 2012 20:25:35 +0000 (14:25 -0600)
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>
Tue, 11 Dec 2012 20:25:35 +0000 (14:25 -0600)
commit756bb2b44c101756449182c2ca77a66e091a4eb8
treebe5b372b0d6048657b21ad4b78f61dc1a3a53bb2
parent71be4d6ff8bddbd29abdeb357f1eccd37adc84ed
serial-dmm: Save dmm_info struct in device contect

The dmm_info struct contains useful information, most notably, the
recieve_data callback. Save a pointer to the struct in dev_context
and use that to get the recieve_data callback.
This eliminates the need for a switch statement in
hw_dev_acquisition_start(), and creates one less place to hook in
a new serial dmm.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
hardware/serial-dmm/api.c
hardware/serial-dmm/protocol.h