memset(be, 0, sizeof(*be));
- be->is_instance_set = FALSE;
+ be->is_instance_set = 0;
be->dev = dev;
dev->data = be;
return;
}
- if (be->is_instance_set != FALSE && be->instance != instance) {
+ if (be->is_instance_set != 0 && be->instance != instance) {
printk(KERN_WARNING
"tpmback: changing instance (from %ld to %ld) "
"not allowed.\n",
return;
}
- if (be->is_instance_set == FALSE) {
+ if (be->is_instance_set == 0) {
be->tpmif = tpmif_find(dev->otherend_id,
instance);
if (IS_ERR(be->tpmif)) {
return;
}
be->instance = instance;
- be->is_instance_set = TRUE;
+ be->is_instance_set = 1;
/*
* There's an unfortunate problem:
static void destroy_tpmring(struct tpmfront_info *info, struct tpm_private *tp)
{
- tpmif_set_connected_state(tp, FALSE);
+ tpmif_set_connected_state(tp, 0);
if ( tp->tx != NULL ) {
gnttab_end_foreign_access(info->ring_ref, 0,
(unsigned long)tp->tx);
break;
case XenbusStateConnected:
- tpmif_set_connected_state(tp, TRUE);
+ tpmif_set_connected_state(tp, 1);
break;
case XenbusStateClosing:
- tpmif_set_connected_state(tp, FALSE);
+ tpmif_set_connected_state(tp, 0);
break;
case XenbusStateClosed:
- if (tp->is_suspended == FALSE) {
+ if (tp->is_suspended == 0) {
device_unregister(&dev->dev);
}
break;
/* lock, so no app can send */
down(&suspend_lock);
- tp->is_suspended = TRUE;
+ tp->is_suspended = 1;
while (atomic_read(&tp->tx_busy) && ctr <= 25) {
if ((ctr % 10) == 0)
return -EBUSY;
}
- if (tp->is_connected != TRUE) {
+ if (tp->is_connected != 1) {
spin_unlock_irq(&tp->tx_lock);
return -EIO;
}
* should disconnect - assumption is that we will resume
* The semaphore keeps apps from sending.
*/
- if (is_connected == FALSE && tp->is_suspended == TRUE) {
+ if (is_connected == 0 && tp->is_suspended == 1) {
return;
}
* after being suspended - now resuming.
* This also removes the suspend state.
*/
- if (is_connected == TRUE && tp->is_suspended == TRUE) {
- tp->is_suspended = FALSE;
+ if (is_connected == 1 && tp->is_suspended == 1) {
+ tp->is_suspended = 0;
/* unlock, so apps can resume sending */
up(&suspend_lock);
}