DENX . Training2 . LddOpenAndRelease

5.3.4. The open and release methods

API

open and release:

int open(struct inode *i, struct file *filp)
int release(struct inode *i, struct file *filp)

find device numbers given an inode:

unsigned int imajor(struct inode* i);
unsigned int iminor(struct inode* i);

find containing structure:

container_of(container_field_ptr, container_type, name_of_container_field);

----- Revision r1.2 - 14 Feb 2008 - 15:34 - MarkusKlotzbuecher
Copyright © 2002-2022 by DENX Software Engineering