ia64/xen-unstable

changeset 8621:f1fc94516c4c

bool type doesn't exist in C, don't try to emulate one.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
author vhanquez@kneesa.uk.xensource.com
date Mon Jan 16 22:11:43 2006 +0000 (2006-01-16)
parents 927cd2e4f150
children 9f2c47ae2b86
files linux-2.6-xen-sparse/drivers/xen/tpmback/common.h linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.c linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/tpmback/common.h	Mon Jan 16 22:07:29 2006 +0000
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/tpmback/common.h	Mon Jan 16 22:11:43 2006 +0000
     1.3 @@ -76,11 +76,6 @@ extern int num_frontends;
     1.4  
     1.5  #define MMAP_VADDR(t,_req) ((t)->mmap_vstart + ((_req) * PAGE_SIZE))
     1.6  
     1.7 -#ifndef TRUE
     1.8 -#define TRUE 1
     1.9 -#define FALSE 0
    1.10 -#endif
    1.11 -
    1.12  #endif /* __TPMIF__BACKEND__COMMON_H__ */
    1.13  
    1.14  /*
     2.1 --- a/linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c	Mon Jan 16 22:07:29 2006 +0000
     2.2 +++ b/linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c	Mon Jan 16 22:11:43 2006 +0000
     2.3 @@ -78,7 +78,7 @@ static int tpmback_probe(struct xenbus_d
     2.4  
     2.5  	memset(be, 0, sizeof(*be));
     2.6  
     2.7 -	be->is_instance_set = FALSE;
     2.8 +	be->is_instance_set = 0;
     2.9  	be->dev = dev;
    2.10  	dev->data = be;
    2.11  
    2.12 @@ -120,7 +120,7 @@ static void backend_changed(struct xenbu
    2.13  		return;
    2.14  	}
    2.15  
    2.16 -	if (be->is_instance_set != FALSE && be->instance != instance) {
    2.17 +	if (be->is_instance_set != 0 && be->instance != instance) {
    2.18  		printk(KERN_WARNING
    2.19  		       "tpmback: changing instance (from %ld to %ld) "
    2.20  		       "not allowed.\n",
    2.21 @@ -128,7 +128,7 @@ static void backend_changed(struct xenbu
    2.22  		return;
    2.23  	}
    2.24  
    2.25 -	if (be->is_instance_set == FALSE) {
    2.26 +	if (be->is_instance_set == 0) {
    2.27  		be->tpmif = tpmif_find(dev->otherend_id,
    2.28  		                       instance);
    2.29  		if (IS_ERR(be->tpmif)) {
    2.30 @@ -138,7 +138,7 @@ static void backend_changed(struct xenbu
    2.31  			return;
    2.32  		}
    2.33  		be->instance = instance;
    2.34 -		be->is_instance_set = TRUE;
    2.35 +		be->is_instance_set = 1;
    2.36  
    2.37  		/*
    2.38  		 * There's an unfortunate problem:
     3.1 --- a/linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.c	Mon Jan 16 22:07:29 2006 +0000
     3.2 +++ b/linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.c	Mon Jan 16 22:11:43 2006 +0000
     3.3 @@ -241,7 +241,7 @@ fail:
     3.4  
     3.5  static void destroy_tpmring(struct tpmfront_info *info, struct tpm_private *tp)
     3.6  {
     3.7 -	tpmif_set_connected_state(tp, FALSE);
     3.8 +	tpmif_set_connected_state(tp, 0);
     3.9  	if ( tp->tx != NULL ) {
    3.10  		gnttab_end_foreign_access(info->ring_ref, 0,
    3.11  					  (unsigned long)tp->tx);
    3.12 @@ -329,15 +329,15 @@ static void backend_changed(struct xenbu
    3.13  		break;
    3.14  
    3.15  	case XenbusStateConnected:
    3.16 -		tpmif_set_connected_state(tp, TRUE);
    3.17 +		tpmif_set_connected_state(tp, 1);
    3.18  		break;
    3.19  
    3.20  	case XenbusStateClosing:
    3.21 -		tpmif_set_connected_state(tp, FALSE);
    3.22 +		tpmif_set_connected_state(tp, 0);
    3.23  		break;
    3.24  
    3.25  	case XenbusStateClosed:
    3.26 -        	if (tp->is_suspended == FALSE) {
    3.27 +        	if (tp->is_suspended == 0) {
    3.28          	        device_unregister(&dev->dev);
    3.29          	}
    3.30  	        break;
    3.31 @@ -401,7 +401,7 @@ tpmfront_suspend(struct xenbus_device *d
    3.32  
    3.33  	/* lock, so no app can send */
    3.34  	down(&suspend_lock);
    3.35 -	tp->is_suspended = TRUE;
    3.36 +	tp->is_suspended = 1;
    3.37  
    3.38  	while (atomic_read(&tp->tx_busy) && ctr <= 25) {
    3.39  		if ((ctr % 10) == 0)
    3.40 @@ -571,7 +571,7 @@ tpm_xmit(struct tpm_private *tp,
    3.41  		return -EBUSY;
    3.42  	}
    3.43  
    3.44 -	if (tp->is_connected != TRUE) {
    3.45 +	if (tp->is_connected != 1) {
    3.46  		spin_unlock_irq(&tp->tx_lock);
    3.47  		return -EIO;
    3.48  	}
    3.49 @@ -660,7 +660,7 @@ static void tpmif_set_connected_state(st
    3.50  	 * should disconnect - assumption is that we will resume
    3.51  	 * The semaphore keeps apps from sending.
    3.52  	 */
    3.53 -	if (is_connected == FALSE && tp->is_suspended == TRUE) {
    3.54 +	if (is_connected == 0 && tp->is_suspended == 1) {
    3.55  		return;
    3.56  	}
    3.57  
    3.58 @@ -669,8 +669,8 @@ static void tpmif_set_connected_state(st
    3.59  	 * after being suspended - now resuming.
    3.60  	 * This also removes the suspend state.
    3.61  	 */
    3.62 -	if (is_connected == TRUE && tp->is_suspended == TRUE) {
    3.63 -		tp->is_suspended = FALSE;
    3.64 +	if (is_connected == 1 && tp->is_suspended == 1) {
    3.65 +		tp->is_suspended = 0;
    3.66  		/* unlock, so apps can resume sending */
    3.67  		up(&suspend_lock);
    3.68  	}
     4.1 --- a/linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.h	Mon Jan 16 22:07:29 2006 +0000
     4.2 +++ b/linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.h	Mon Jan 16 22:11:43 2006 +0000
     4.3 @@ -1,11 +1,6 @@
     4.4  #ifndef TPM_FRONT_H
     4.5  #define TPM_FRONT_H
     4.6  
     4.7 -#ifndef TRUE
     4.8 -#define TRUE 1
     4.9 -#define FALSE 0
    4.10 -#endif
    4.11 -
    4.12  struct tpm_private {
    4.13  	tpmif_tx_interface_t *tx;
    4.14  	unsigned int evtchn;