X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fchar_stream.c;h=f0c762d7b8828c70177585c62ba123f58e8232a4;hb=9d406e84682878859284200ae00251d27c53c845;hp=be723992a6cd26b27fac052108ab3c13af000279;hpb=72420d58d18ec71d4777d029daaf0c6a1c820b32;p=palacios-OLD.git diff --git a/palacios/src/devices/char_stream.c b/palacios/src/devices/char_stream.c index be72399..f0c762d 100644 --- a/palacios/src/devices/char_stream.c +++ b/palacios/src/devices/char_stream.c @@ -18,7 +18,7 @@ */ #include -#include +#include #include #include #include @@ -53,9 +53,7 @@ static int stream_write(uint8_t * buf, uint64_t length, void * private_data) { return v3_stream_write(state->stream, buf, length); } -static int stream_free(struct vm_device * dev) { - struct stream_state * state = (struct stream_state *)(dev->private_data); - +static int stream_free(struct stream_state * state) { v3_stream_close(state->stream); // detach host event @@ -67,7 +65,7 @@ static int stream_free(struct vm_device * dev) { static struct v3_device_ops dev_ops = { - .free = stream_free, + .free = (int (*)(void *))stream_free, }; static int stream_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {