Lines Matching refs:priv
824 * @priv: private file structure to be initialized
829 heci_init_file_private(struct heci_file_private *priv,
834 (void) memset(priv, 0, sizeof (struct heci_file_private));
835 mutex_init(&priv->file_lock, NULL, MUTEX_DRIVER, NULL);
836 mutex_init(&priv->read_io_lock, NULL, MUTEX_DRIVER, NULL);
837 mutex_init(&priv->write_io_lock, NULL, MUTEX_DRIVER, NULL);
838 cv_init(&priv->rx_wait, NULL, CV_DRIVER, NULL);
839 DBG("priv->rx_wait =%p\n", (void *)&priv->rx_wait);
840 LIST_INIT_HEAD(&priv->link);
841 priv->reading_state = HECI_IDLE;
842 priv->writing_state = HECI_IDLE;
849 * @priv: private file structure to set client_id in
857 struct heci_file_private *priv,
862 if ((dev == NULL) || (priv == NULL) || (cguid == NULL))
869 priv->me_client_id = dev->me_clients[i].client_id;
870 priv->state = HECI_FILE_CONNECTING;
871 priv->host_client_id = client_id;
873 list_add_tail(&priv->link, &dev->file_list);
912 * @priv: private file structure
919 struct heci_file_private *priv,
925 if ((dev == NULL) || (priv == NULL))
928 if (!heci_connect(dev, priv)) {
930 priv->host_client_id);
931 heci_remove_client_from_file_list(dev, priv->host_client_id);
932 priv->state = HECI_FILE_DISCONNECTED;
936 while (!(HECI_FILE_CONNECTED == priv->state ||
937 HECI_FILE_DISCONNECTED == priv->state) &&
942 if (HECI_FILE_CONNECTED != priv->state) {
943 heci_remove_client_from_file_list(dev, priv->host_client_id);
945 priv->host_client_id, priv->state);
948 priv->state = HECI_FILE_DISCONNECTED;
952 priv->host_client_id);
1051 struct heci_file_private *priv;
1053 priv = kmem_zalloc(sizeof (struct heci_file_private), KM_SLEEP);
1054 if (!priv)
1057 heci_init_file_private(priv, file);
1059 return (priv);
1067 heci_free_file_private(struct heci_file_private *priv)
1069 mutex_destroy(&priv->file_lock);
1070 mutex_destroy(&priv->read_io_lock);
1071 mutex_destroy(&priv->write_io_lock);
1072 cv_destroy(&priv->rx_wait);
1073 kmem_free(priv, sizeof (struct heci_file_private));