mei: make mei_write_message more readable
authorTomas Winkler <tomas.winkler@intel.com>
Tue, 19 Jun 2012 06:13:35 +0000 (09:13 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Jun 2012 23:41:38 +0000 (16:41 -0700)
commit169d1338ed4ed91412761a77095a13b9992993ba
tree58deb492b59544715bd0fb7c36913d43807244db
parentd20411588d2f47ded7b0a02ed1005c7e3ce0df40
mei: make mei_write_message more readable

1. reduce hairy casting
2. replace open code with mei_count_empty_write_slots
4. include header size in check for overflow
3. use concise for loop instead of a while loop

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/interface.c