software/drivers/sd8887/src/bluetooth/bt/mbt_char.c
/**
 *	@brief poll handler for char dev
 *
 *	@param filp	pointer to structure file
 *	@param wait		pointer to poll_table structure
 *	@return			mask
 */
@brief poll handler for char dev
@param filp     pointer to structure file
@param wait             pointer to poll_table structure
@return                 mask
@brief poll handler for char dev @param filp pointer to structure file @param wait pointer to poll_table structure @return mask
static unsigned int
chardev_poll(struct file *filp, poll_table * wait)
{
	unsigned int mask;
	struct char_dev *dev = (struct char_dev *)filp->private_data;
	struct m_dev *m_dev = NULL;
	ENTER();
	if (!dev || !dev->m_dev) {
		LEAVE();
		return -ENXIO;
	}
	m_dev = dev->m_dev;
	poll_wait(filp, &m_dev->req_wait_q, wait);
	mask = POLLOUT | POLLWRNORM;
	if (skb_peek(&m_dev->rx_q))
		mask |= POLLIN | POLLRDNORM;
	if (!test_bit(HCI_UP, &(m_dev->flags)))
		mask |= POLLHUP;
	PRINTM(INFO, "poll mask=0x%x\n", mask);
	LEAVE();
	return mask;
}
static unsigned int chardev_poll ( struct file * filp , poll_table * wait ) { unsigned int mask ; struct char_dev * dev = ( struct char_dev * ) filp -> private_data ; struct m_dev * m_dev = NULL ; ENTER ( ) ; if ( ! dev || ! dev -> m_dev ) { LEAVE ( ) ; return - ENXIO ; } m_dev = dev -> m_dev ; poll_wait ( filp , & m_dev -> req_wait_q , wait ) ; mask = POLLOUT | POLLWRNORM ; if ( skb_peek ( & m_dev -> rx_q ) ) mask |= POLLIN | POLLRDNORM ; if ( ! test_bit ( HCI_UP , & ( m_dev -> flags ) ) ) mask |= POLLHUP ; PRINTM ( INFO , " \n " , mask ) ; LEAVE ( ) ; return mask ; }
@brief poll handler for char dev
      @param filp     pointer to structure file
      @param wait             pointer to poll_table structure
      @return                 mask
@brief poll handler for char dev @param filp pointer to structure file @param wait pointer to poll_table structure @return mask