mei: drop iamthif_mtu from device structure

We can receive mtu with one call now, no need to store it.

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Alexander Usyskin 2015-05-04 09:43:58 +03:00 committed by Greg Kroah-Hartman
parent eeabfcf5a9
commit 9e23936279
2 changed files with 1 additions and 10 deletions

View File

@ -72,12 +72,6 @@ int mei_amthif_host_init(struct mei_device *dev, struct mei_me_client *me_cl)
mei_cl_init(cl, dev); mei_cl_init(cl, dev);
/* Assign iamthif_mtu to the value received from ME */
dev->iamthif_mtu = me_cl->props.max_msg_length;
dev_dbg(dev->dev, "IAMTHIF_MTU = %d\n", dev->iamthif_mtu);
ret = mei_cl_link(cl, MEI_IAMTHIF_HOST_CLIENT_ID); ret = mei_cl_link(cl, MEI_IAMTHIF_HOST_CLIENT_ID);
if (ret < 0) { if (ret < 0) {
dev_err(dev->dev, "amthif: failed cl_link %d\n", ret); dev_err(dev->dev, "amthif: failed cl_link %d\n", ret);
@ -239,7 +233,6 @@ static int mei_amthif_read_start(struct mei_cl *cl, struct file *file)
{ {
struct mei_device *dev = cl->dev; struct mei_device *dev = cl->dev;
struct mei_cl_cb *cb; struct mei_cl_cb *cb;
size_t length = dev->iamthif_mtu;
int rets; int rets;
cb = mei_io_cb_init(cl, MEI_FOP_READ, file); cb = mei_io_cb_init(cl, MEI_FOP_READ, file);
@ -248,7 +241,7 @@ static int mei_amthif_read_start(struct mei_cl *cl, struct file *file)
goto err; goto err;
} }
rets = mei_io_cb_alloc_buf(cb, length); rets = mei_io_cb_alloc_buf(cb, mei_cl_mtu(cl));
if (rets) if (rets)
goto err; goto err;

View File

@ -490,7 +490,6 @@ const char *mei_pg_state_str(enum mei_pg_state state);
* @iamthif_cl : amthif host client * @iamthif_cl : amthif host client
* @iamthif_current_cb : amthif current operation callback * @iamthif_current_cb : amthif current operation callback
* @iamthif_open_count : number of opened amthif connections * @iamthif_open_count : number of opened amthif connections
* @iamthif_mtu : amthif client max message length
* @iamthif_timer : time stamp of current amthif command completion * @iamthif_timer : time stamp of current amthif command completion
* @iamthif_stall_timer : timer to detect amthif hang * @iamthif_stall_timer : timer to detect amthif hang
* @iamthif_state : amthif processor state * @iamthif_state : amthif processor state
@ -586,7 +585,6 @@ struct mei_device {
struct mei_cl iamthif_cl; struct mei_cl iamthif_cl;
struct mei_cl_cb *iamthif_current_cb; struct mei_cl_cb *iamthif_current_cb;
long iamthif_open_count; long iamthif_open_count;
int iamthif_mtu;
unsigned long iamthif_timer; unsigned long iamthif_timer;
u32 iamthif_stall_timer; u32 iamthif_stall_timer;
enum iamthif_states iamthif_state; enum iamthif_states iamthif_state;