/* * Copyright 2012-15 Advanced Micro Devices, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. * * Authors: AMD *
*/
/* * Pre-requisites: headers required by header of this unit
*/
// No action if allocation failed during gpio construct if (!gpio->hw_container.ddc) {
BREAK_TO_DEBUGGER(); return GPIO_RESULT_NON_SPECIFIC_ERROR;
}
gpio->mode = mode;
//initialize hw_container union based on id switch (gpio->id) { case GPIO_ID_DDC_DATA:
gpio->service->factory.funcs->init_ddc_data(&gpio->hw_container.ddc, service->ctx, id, en); break; case GPIO_ID_DDC_CLOCK:
gpio->service->factory.funcs->init_ddc_data(&gpio->hw_container.ddc, service->ctx, id, en); break; case GPIO_ID_GENERIC:
gpio->service->factory.funcs->init_generic(&gpio->hw_container.generic, service->ctx, id, en); break; case GPIO_ID_HPD:
gpio->service->factory.funcs->init_hpd(&gpio->hw_container.hpd, service->ctx, id, en); break; // TODO: currently gpio for sync and gsl does not get created, might need it later case GPIO_ID_SYNC: break; case GPIO_ID_GSL: break; default:
ASSERT_CRITICAL(false);
gpio->pin = NULL;
}
switch ((*gpio)->id) { case GPIO_ID_DDC_DATA:
kfree((*gpio)->hw_container.ddc);
(*gpio)->hw_container.ddc = NULL; break; case GPIO_ID_DDC_CLOCK: //TODO: might want to change it to init_ddc_clock
kfree((*gpio)->hw_container.ddc);
(*gpio)->hw_container.ddc = NULL; break; case GPIO_ID_GENERIC:
kfree((*gpio)->hw_container.generic);
(*gpio)->hw_container.generic = NULL; break; case GPIO_ID_HPD:
kfree((*gpio)->hw_container.hpd);
(*gpio)->hw_container.hpd = NULL; break; // TODO: currently gpio for sync and gsl does not get created, might need it later case GPIO_ID_SYNC: break; case GPIO_ID_GSL: break; default: break;
}
kfree(*gpio);
*gpio = NULL;
}
Messung V0.5
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.