tpm-dev.c (03b22057e8ed2d1df416c9ae8e6e247e0b87ecc8) | tpm-dev.c (745b361e989af21ad40811c2586b60229f870a68) |
---|---|
1/* 2 * Copyright (C) 2004 IBM Corporation 3 * Authors: 4 * Leendert van Doorn <leendert@watson.ibm.com> 5 * Dave Safford <safford@watson.ibm.com> 6 * Reiner Sailer <sailer@watson.ibm.com> 7 * Kylene Hall <kjhall@us.ibm.com> 8 * --- 133 unchanged lines hidden (view full) --- 142 /* atomic tpm command send and result receive. We only hold the ops 143 * lock during this period so that the tpm can be unregistered even if 144 * the char dev is held open. 145 */ 146 if (tpm_try_get_ops(priv->chip)) { 147 mutex_unlock(&priv->buffer_mutex); 148 return -EPIPE; 149 } | 1/* 2 * Copyright (C) 2004 IBM Corporation 3 * Authors: 4 * Leendert van Doorn <leendert@watson.ibm.com> 5 * Dave Safford <safford@watson.ibm.com> 6 * Reiner Sailer <sailer@watson.ibm.com> 7 * Kylene Hall <kjhall@us.ibm.com> 8 * --- 133 unchanged lines hidden (view full) --- 142 /* atomic tpm command send and result receive. We only hold the ops 143 * lock during this period so that the tpm can be unregistered even if 144 * the char dev is held open. 145 */ 146 if (tpm_try_get_ops(priv->chip)) { 147 mutex_unlock(&priv->buffer_mutex); 148 return -EPIPE; 149 } |
150 out_size = tpm_transmit(priv->chip, priv->data_buffer, | 150 out_size = tpm_transmit(priv->chip, NULL, priv->data_buffer, |
151 sizeof(priv->data_buffer), 0); 152 153 tpm_put_ops(priv->chip); 154 if (out_size < 0) { 155 mutex_unlock(&priv->buffer_mutex); 156 return out_size; 157 } 158 --- 35 unchanged lines hidden --- | 151 sizeof(priv->data_buffer), 0); 152 153 tpm_put_ops(priv->chip); 154 if (out_size < 0) { 155 mutex_unlock(&priv->buffer_mutex); 156 return out_size; 157 } 158 --- 35 unchanged lines hidden --- |