diff options
| -rw-r--r-- | drivers/misc/mei/hbm.c | 10 | ||||
| -rw-r--r-- | drivers/misc/mei/mei_dev.h | 6 |
2 files changed, 9 insertions, 7 deletions
diff --git a/drivers/misc/mei/hbm.c b/drivers/misc/mei/hbm.c index 6127ab64bb39..0a0448326e9d 100644 --- a/drivers/misc/mei/hbm.c +++ b/drivers/misc/mei/hbm.c | |||
| @@ -35,11 +35,15 @@ static void mei_hbm_me_cl_allocate(struct mei_device *dev) | |||
| 35 | struct mei_me_client *clients; | 35 | struct mei_me_client *clients; |
| 36 | int b; | 36 | int b; |
| 37 | 37 | ||
| 38 | dev->me_clients_num = 0; | ||
| 39 | dev->me_client_presentation_num = 0; | ||
| 40 | dev->me_client_index = 0; | ||
| 41 | |||
| 38 | /* count how many ME clients we have */ | 42 | /* count how many ME clients we have */ |
| 39 | for_each_set_bit(b, dev->me_clients_map, MEI_CLIENTS_MAX) | 43 | for_each_set_bit(b, dev->me_clients_map, MEI_CLIENTS_MAX) |
| 40 | dev->me_clients_num++; | 44 | dev->me_clients_num++; |
| 41 | 45 | ||
| 42 | if (dev->me_clients_num <= 0) | 46 | if (dev->me_clients_num == 0) |
| 43 | return; | 47 | return; |
| 44 | 48 | ||
| 45 | kfree(dev->me_clients); | 49 | kfree(dev->me_clients); |
| @@ -221,7 +225,7 @@ static int mei_hbm_prop_req(struct mei_device *dev) | |||
| 221 | struct hbm_props_request *prop_req; | 225 | struct hbm_props_request *prop_req; |
| 222 | const size_t len = sizeof(struct hbm_props_request); | 226 | const size_t len = sizeof(struct hbm_props_request); |
| 223 | unsigned long next_client_index; | 227 | unsigned long next_client_index; |
| 224 | u8 client_num; | 228 | unsigned long client_num; |
| 225 | 229 | ||
| 226 | 230 | ||
| 227 | client_num = dev->me_client_presentation_num; | 231 | client_num = dev->me_client_presentation_num; |
| @@ -677,8 +681,6 @@ void mei_hbm_dispatch(struct mei_device *dev, struct mei_msg_hdr *hdr) | |||
| 677 | if (dev->dev_state == MEI_DEV_INIT_CLIENTS && | 681 | if (dev->dev_state == MEI_DEV_INIT_CLIENTS && |
| 678 | dev->hbm_state == MEI_HBM_ENUM_CLIENTS) { | 682 | dev->hbm_state == MEI_HBM_ENUM_CLIENTS) { |
| 679 | dev->init_clients_timer = 0; | 683 | dev->init_clients_timer = 0; |
| 680 | dev->me_client_presentation_num = 0; | ||
| 681 | dev->me_client_index = 0; | ||
| 682 | mei_hbm_me_cl_allocate(dev); | 684 | mei_hbm_me_cl_allocate(dev); |
| 683 | dev->hbm_state = MEI_HBM_CLIENT_PROPERTIES; | 685 | dev->hbm_state = MEI_HBM_CLIENT_PROPERTIES; |
| 684 | 686 | ||
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h index 7b918b2fb894..456b322013e2 100644 --- a/drivers/misc/mei/mei_dev.h +++ b/drivers/misc/mei/mei_dev.h | |||
| @@ -396,9 +396,9 @@ struct mei_device { | |||
| 396 | struct mei_me_client *me_clients; /* Note: memory has to be allocated */ | 396 | struct mei_me_client *me_clients; /* Note: memory has to be allocated */ |
| 397 | DECLARE_BITMAP(me_clients_map, MEI_CLIENTS_MAX); | 397 | DECLARE_BITMAP(me_clients_map, MEI_CLIENTS_MAX); |
| 398 | DECLARE_BITMAP(host_clients_map, MEI_CLIENTS_MAX); | 398 | DECLARE_BITMAP(host_clients_map, MEI_CLIENTS_MAX); |
| 399 | u8 me_clients_num; | 399 | unsigned long me_clients_num; |
| 400 | u8 me_client_presentation_num; | 400 | unsigned long me_client_presentation_num; |
| 401 | u8 me_client_index; | 401 | unsigned long me_client_index; |
| 402 | 402 | ||
| 403 | struct mei_cl wd_cl; | 403 | struct mei_cl wd_cl; |
| 404 | enum mei_wd_states wd_state; | 404 | enum mei_wd_states wd_state; |
