UbixOS  2.0
device.c File Reference
#include <sys/device.h>
#include <ubixos/spinlock.h>
#include <lib/kmalloc.h>
#include <lib/kprintf.h>
#include <assert.h>
Include dependency graph for device.c:

Go to the source code of this file.

Functions

int device_add (int minor, char type, struct device_interface *devInfo)
 
struct device_nodedevice_find (int major, int minor)
 
int device_remove (struct device_node *deviceToDelete)
 

Function Documentation

◆ device_add()

int device_add ( int  minor,
char  type,
struct device_interface devInfo 
)

Definition at line 49 of file device.c.

References device_node::devInfo, kmalloc(), kprintf(), device_node::minor, NULL, device_node::prev, spinLock(), and device_node::type.

Referenced by fdc_init().

Here is the call graph for this function:

◆ device_find()

struct device_node* device_find ( int  major,
int  minor 
)

Definition at line 82 of file device.c.

References spinLock().

Referenced by vfs_mount().

Here is the call graph for this function:

◆ device_remove()

int device_remove ( struct device_node deviceToDelete)

Definition at line 104 of file device.c.