Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Alexander Usyskin and committed by
Greg Kroah-Hartman
9e239362 eeabfcf5

+1 -10
+1 -8
drivers/misc/mei/amthif.c
··· 72 72 73 73 mei_cl_init(cl, dev); 74 74 75 - /* Assign iamthif_mtu to the value received from ME */ 76 - 77 - dev->iamthif_mtu = me_cl->props.max_msg_length; 78 - dev_dbg(dev->dev, "IAMTHIF_MTU = %d\n", dev->iamthif_mtu); 79 - 80 - 81 75 ret = mei_cl_link(cl, MEI_IAMTHIF_HOST_CLIENT_ID); 82 76 if (ret < 0) { 83 77 dev_err(dev->dev, "amthif: failed cl_link %d\n", ret); ··· 233 239 { 234 240 struct mei_device *dev = cl->dev; 235 241 struct mei_cl_cb *cb; 236 - size_t length = dev->iamthif_mtu; 237 242 int rets; 238 243 239 244 cb = mei_io_cb_init(cl, MEI_FOP_READ, file); ··· 241 248 goto err; 242 249 } 243 250 244 - rets = mei_io_cb_alloc_buf(cb, length); 251 + rets = mei_io_cb_alloc_buf(cb, mei_cl_mtu(cl)); 245 252 if (rets) 246 253 goto err; 247 254
-2
drivers/misc/mei/mei_dev.h
··· 490 490 * @iamthif_cl : amthif host client 491 491 * @iamthif_current_cb : amthif current operation callback 492 492 * @iamthif_open_count : number of opened amthif connections 493 - * @iamthif_mtu : amthif client max message length 494 493 * @iamthif_timer : time stamp of current amthif command completion 495 494 * @iamthif_stall_timer : timer to detect amthif hang 496 495 * @iamthif_state : amthif processor state ··· 585 586 struct mei_cl iamthif_cl; 586 587 struct mei_cl_cb *iamthif_current_cb; 587 588 long iamthif_open_count; 588 - int iamthif_mtu; 589 589 unsigned long iamthif_timer; 590 590 u32 iamthif_stall_timer; 591 591 enum iamthif_states iamthif_state;