dect
/
libdect
Archived
13
0
Fork 0

libdect: add function to get file descriptor number

Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
Patrick McHardy 2010-07-08 22:41:54 +02:00
parent e789864557
commit 2bca18c9df
2 changed files with 12 additions and 0 deletions

View File

@ -79,6 +79,7 @@ enum dect_fd_events {
struct dect_fd;
extern void *dect_fd_priv(struct dect_fd *dfd);
extern int dect_fd_num(const struct dect_fd *dfd);
extern void dect_handle_fd(struct dect_handle *dh, struct dect_fd *dfd,
uint32_t events);
/** @} */

View File

@ -65,6 +65,17 @@ void *dect_fd_priv(struct dect_fd *dfd)
}
EXPORT_SYMBOL(dect_fd_priv);
/**
* Get the file descriptor number from a DECT file descriptor.
*
* @param dfd DECT file descriptor
*/
int dect_fd_num(const struct dect_fd *dfd)
{
return dfd->fd;
}
EXPORT_SYMBOL(dect_fd_num);
void dect_setup_fd(struct dect_fd *dfd,
void (*cb)(struct dect_handle *, struct dect_fd *, uint32_t),
void *data)