Introduce mei_data2slots wrapper for sake of
readability. This wrapper close up the open code
for computing slots from a message length:
rond up dwords count from payload and header byte size
Signed-off-by: Tomas Winkler <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
1. We record host (write) buffer depth during reset
so we don't need to query HCSR register later on.
The host buffer depth doesn't change after the reset
2. Use mei_hbuf_max_data function to compute payload size in bytes
Signed-off-by: Tomas Winkler <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The header exports API for application layer
1. move under include/linux and add to the export list
2. update include path n the sources
3. update TODO
Signed-off-by: Tomas Winkler <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
It's been cleaned up, and there's nothing else left to do, so move it
out of staging into drivers/misc/ where all can use it now.
Cc: Tomas Winkler <[email protected]>
Cc: Oren Weil <[email protected]>
Cc: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>