mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-26 14:18:20 +00:00
25
bsps/shared/grlib/amba/ambapp_alloc.c
Normal file
25
bsps/shared/grlib/amba/ambapp_alloc.c
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* AMBA Plug & Play routines
|
||||
*
|
||||
* COPYRIGHT (c) 2011
|
||||
* Aeroflex Gaisler
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
*/
|
||||
|
||||
#include <grlib/ambapp.h>
|
||||
|
||||
int ambapp_alloc_dev(struct ambapp_dev *dev, void *owner)
|
||||
{
|
||||
if (dev->owner)
|
||||
return -1;
|
||||
dev->owner = owner;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ambapp_free_dev(struct ambapp_dev *dev)
|
||||
{
|
||||
dev->owner = 0;
|
||||
}
|
||||
Reference in New Issue
Block a user