diff --git a/master/foe_request.c b/master/foe_request.c index 794d3d9c..66a65e8f 100644 --- a/master/foe_request.c +++ b/master/foe_request.c @@ -1,8 +1,7 @@ /****************************************************************************** - * - * $Id$ * * Copyright (C) 2008 Olav Zarges, imc Messsysteme GmbH + * Copyright (C) 2020 Florian Pose, IgH * * This file is part of the IgH EtherCAT Master. * @@ -36,6 +35,7 @@ #include #include #include +#include #include "foe_request.h" #include "foe.h" @@ -91,7 +91,7 @@ void ec_foe_request_clear_data( ) { if (req->buffer) { - kfree(req->buffer); + vfree(req->buffer); req->buffer = NULL; } @@ -119,7 +119,7 @@ int ec_foe_request_alloc( ec_foe_request_clear_data(req); - if (!(req->buffer = (uint8_t *) kmalloc(size, GFP_KERNEL))) { + if (!(req->buffer = (uint8_t *) vmalloc(size))) { EC_ERR("Failed to allocate %zu bytes of FoE memory.\n", size); return -ENOMEM; }