|
@@ -35,11 +35,15 @@ static void mei_hbm_me_cl_allocate(struct mei_device *dev)
|
|
|
struct mei_me_client *clients;
|
|
|
int b;
|
|
|
|
|
|
+ dev->me_clients_num = 0;
|
|
|
+ dev->me_client_presentation_num = 0;
|
|
|
+ dev->me_client_index = 0;
|
|
|
+
|
|
|
/* count how many ME clients we have */
|
|
|
for_each_set_bit(b, dev->me_clients_map, MEI_CLIENTS_MAX)
|
|
|
dev->me_clients_num++;
|
|
|
|
|
|
- if (dev->me_clients_num <= 0)
|
|
|
+ if (dev->me_clients_num == 0)
|
|
|
return;
|
|
|
|
|
|
kfree(dev->me_clients);
|
|
@@ -221,7 +225,7 @@ static int mei_hbm_prop_req(struct mei_device *dev)
|
|
|
struct hbm_props_request *prop_req;
|
|
|
const size_t len = sizeof(struct hbm_props_request);
|
|
|
unsigned long next_client_index;
|
|
|
- u8 client_num;
|
|
|
+ unsigned long client_num;
|
|
|
|
|
|
|
|
|
client_num = dev->me_client_presentation_num;
|
|
@@ -677,8 +681,6 @@ void mei_hbm_dispatch(struct mei_device *dev, struct mei_msg_hdr *hdr)
|
|
|
if (dev->dev_state == MEI_DEV_INIT_CLIENTS &&
|
|
|
dev->hbm_state == MEI_HBM_ENUM_CLIENTS) {
|
|
|
dev->init_clients_timer = 0;
|
|
|
- dev->me_client_presentation_num = 0;
|
|
|
- dev->me_client_index = 0;
|
|
|
mei_hbm_me_cl_allocate(dev);
|
|
|
dev->hbm_state = MEI_HBM_CLIENT_PROPERTIES;
|
|
|
|