diff options
Diffstat (limited to 'drivers/misc/mei/init.c')
-rw-r--r-- | drivers/misc/mei/init.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c index 88407dfd8557..636639fbfc0a 100644 --- a/drivers/misc/mei/init.c +++ b/drivers/misc/mei/init.c | |||
@@ -278,44 +278,5 @@ void mei_reset(struct mei_device *dev, int interrupts_enabled) | |||
278 | } | 278 | } |
279 | 279 | ||
280 | 280 | ||
281 | /** | ||
282 | * allocate_me_clients_storage - allocates storage for me clients | ||
283 | * | ||
284 | * @dev: the device structure | ||
285 | * | ||
286 | * returns none. | ||
287 | */ | ||
288 | void mei_allocate_me_clients_storage(struct mei_device *dev) | ||
289 | { | ||
290 | struct mei_me_client *clients; | ||
291 | int b; | ||
292 | |||
293 | /* count how many ME clients we have */ | ||
294 | for_each_set_bit(b, dev->me_clients_map, MEI_CLIENTS_MAX) | ||
295 | dev->me_clients_num++; | ||
296 | |||
297 | if (dev->me_clients_num <= 0) | ||
298 | return ; | ||
299 | |||
300 | |||
301 | if (dev->me_clients != NULL) { | ||
302 | kfree(dev->me_clients); | ||
303 | dev->me_clients = NULL; | ||
304 | } | ||
305 | dev_dbg(&dev->pdev->dev, "memory allocation for ME clients size=%zd.\n", | ||
306 | dev->me_clients_num * sizeof(struct mei_me_client)); | ||
307 | /* allocate storage for ME clients representation */ | ||
308 | clients = kcalloc(dev->me_clients_num, | ||
309 | sizeof(struct mei_me_client), GFP_KERNEL); | ||
310 | if (!clients) { | ||
311 | dev_dbg(&dev->pdev->dev, "memory allocation for ME clients failed.\n"); | ||
312 | dev->dev_state = MEI_DEV_RESETING; | ||
313 | mei_reset(dev, 1); | ||
314 | return ; | ||
315 | } | ||
316 | dev->me_clients = clients; | ||
317 | return ; | ||
318 | } | ||
319 | |||
320 | 281 | ||
321 | 282 | ||