diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2012-11-18 15:13:14 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-21 12:43:57 -0800 |
commit | 5bd647144151082f0e8beb58741e27e6dbd23827 (patch) | |
tree | dc63f6e68046d280135cc1823ef65a03dc63dcda /drivers/misc/mei/mei_dev.h | |
parent | 2c9e9fdc0b2d55886609f0503fb91f96dfec6948 (diff) | |
download | linux-5bd647144151082f0e8beb58741e27e6dbd23827.tar.bz2 |
mei: compact code for mei bus message creation
1. replace boilerplate code for filling up the bus message header
with a common wrapper function
2. shorten variable names and use temporal variables
to save some screen space
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/mei_dev.h')
-rw-r--r-- | drivers/misc/mei/mei_dev.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h index aaee666577b4..e511b84ff4ce 100644 --- a/drivers/misc/mei/mei_dev.h +++ b/drivers/misc/mei/mei_dev.h @@ -491,4 +491,15 @@ void mei_csr_clear_his(struct mei_device *dev); void mei_enable_interrupts(struct mei_device *dev); void mei_disable_interrupts(struct mei_device *dev); +static inline struct mei_msg_hdr *mei_hbm_hdr(u32 *buf, size_t length) +{ + struct mei_msg_hdr *hdr = (struct mei_msg_hdr *)buf; + hdr->host_addr = 0; + hdr->me_addr = 0; + hdr->length = length; + hdr->msg_complete = 1; + hdr->reserved = 0; + return hdr; +} + #endif |