From 0a14b16aef859bf129d1e83244864a13c861ed4d Mon Sep 17 00:00:00 2001 From: Florian Pose Date: Fri, 24 Jan 2020 11:09:48 +0100 Subject: [PATCH] Using vmalloc() for FoE memory allocation. --- master/foe_request.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; }