Lines Matching refs:chdev

1883 	struct mport_dev *chdev;  in mport_cdev_open()  local
1892 chdev = container_of(inode->i_cdev, struct mport_dev, cdev); in mport_cdev_open()
1894 rmcd_debug(INIT, "%s filp=%p", dev_name(&chdev->dev), filp); in mport_cdev_open()
1896 if (atomic_read(&chdev->active) == 0) in mport_cdev_open()
1899 get_device(&chdev->dev); in mport_cdev_open()
1903 put_device(&chdev->dev); in mport_cdev_open()
1907 priv->md = chdev; in mport_cdev_open()
1917 put_device(&chdev->dev); in mport_cdev_open()
1918 dev_err(&chdev->dev, DRV_NAME ": kfifo_alloc failed\n"); in mport_cdev_open()
1928 mutex_lock(&chdev->file_mutex); in mport_cdev_open()
1929 list_add_tail(&priv->list, &chdev->file_list); in mport_cdev_open()
1930 mutex_unlock(&chdev->file_mutex); in mport_cdev_open()
2015 struct mport_dev *chdev; in mport_cdev_release() local
2023 chdev = priv->md; in mport_cdev_release()
2028 spin_lock_irqsave(&chdev->pw_lock, flags); in mport_cdev_release()
2034 spin_unlock_irqrestore(&chdev->pw_lock, flags); in mport_cdev_release()
2036 spin_lock_irqsave(&chdev->db_lock, flags); in mport_cdev_release()
2041 spin_unlock_irqrestore(&chdev->db_lock, flags); in mport_cdev_release()
2045 mutex_lock(&chdev->buf_mutex); in mport_cdev_release()
2046 list_for_each_entry_safe(map, _map, &chdev->mappings, node) { in mport_cdev_release()
2053 mutex_unlock(&chdev->buf_mutex); in mport_cdev_release()
2057 mutex_lock(&chdev->file_mutex); in mport_cdev_release()
2059 mutex_unlock(&chdev->file_mutex); in mport_cdev_release()
2060 put_device(&chdev->dev); in mport_cdev_release()
2545 struct mport_dev *chdev = NULL; in mport_add_mport() local
2551 chdev = mport_cdev_add(mport); in mport_add_mport()
2552 if (!chdev) in mport_add_mport()
2565 struct mport_dev *chdev; in mport_remove_mport() local
2572 list_for_each_entry(chdev, &mport_devs, node) { in mport_remove_mport()
2573 if (chdev->mport->id == mport->id) { in mport_remove_mport()
2574 atomic_set(&chdev->active, 0); in mport_remove_mport()
2575 list_del(&chdev->node); in mport_remove_mport()
2583 mport_cdev_remove(chdev); in mport_remove_mport()