ia64/xen-unstable

changeset 5994:7db8ef0e440a

Add prototype for balloon_init_watcher.
Also cleanup balloon_init_watcher whitespace.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Tue Aug 02 19:04:13 2005 +0000 (2005-08-02)
parents 5eead9930294
children f681f5a7f453
files linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c linux-2.6-xen-sparse/include/asm-xen/balloon.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c	Tue Aug 02 18:04:28 2005 +0000
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c	Tue Aug 02 19:04:13 2005 +0000
     1.3 @@ -84,9 +84,6 @@ static struct timer_list balloon_timer;
     1.4  /* Flag for dom0 xenstore workaround */
     1.5  static int balloon_xenbus_init=0;
     1.6  
     1.7 -/* Init Function */
     1.8 -void balloon_init_watcher(void);
     1.9 -
    1.10  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
    1.11  /* Use the private and mapping fields of struct page as a list. */
    1.12  #define PAGE_TO_LIST(p) ( (struct list_head *)&p->private )
    1.13 @@ -354,27 +351,21 @@ static void watch_target(struct xenbus_w
    1.14      
    1.15  }
    1.16  
    1.17 -/* 
    1.18 -   Try to set up our watcher, if not already set
    1.19 -   
    1.20 -*/
    1.21 -void balloon_init_watcher(void) 
    1.22 +/* Init Function - Try to set up our watcher, if not already set. */
    1.23 +void balloon_init_watcher(void)
    1.24  {
    1.25      int err;
    1.26  
    1.27 -    if(!xen_start_info.store_evtchn)
    1.28 -    {
    1.29 +    if (!xen_start_info.store_evtchn) {
    1.30          IPRINTK("Delaying watcher init until xenstore is available\n");
    1.31          return;
    1.32      }
    1.33  
    1.34      down(&xenbus_lock);
    1.35  
    1.36 -    if(! balloon_xenbus_init) 
    1.37 -    {
    1.38 +    if (!balloon_xenbus_init) {
    1.39          err = register_xenbus_watch(&xb_watch);
    1.40 -        if(err) 
    1.41 -        {
    1.42 +        if (err) {
    1.43              /* BIG FAT FIXME: dom0 sequencing workaround
    1.44               * dom0 can't set a watch on memory/target until
    1.45               * after the tools create it.  So, we have to watch
    1.46 @@ -384,16 +375,13 @@ void balloon_init_watcher(void)
    1.47               * non-existant keys
    1.48               */
    1.49              register_xenbus_watch(&root_watch);
    1.50 -        } 
    1.51 -        else
    1.52 -        {
    1.53 +        } else {
    1.54              IPRINTK("Balloon xenbus watcher initialized\n");
    1.55              balloon_xenbus_init = 1;
    1.56          }
    1.57      }
    1.58  
    1.59      up(&xenbus_lock);
    1.60 -
    1.61  }
    1.62  
    1.63  EXPORT_SYMBOL(balloon_init_watcher);
     2.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Tue Aug 02 18:04:28 2005 +0000
     2.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Tue Aug 02 19:04:13 2005 +0000
     2.3 @@ -29,6 +29,7 @@
     2.4  
     2.5  #include <asm-xen/hypervisor.h>
     2.6  #include <asm-xen/xenbus.h>
     2.7 +#include <asm-xen/balloon.h>
     2.8  #include <linux/kernel.h>
     2.9  #include <linux/err.h>
    2.10  #include <linux/string.h>
     3.1 --- a/linux-2.6-xen-sparse/include/asm-xen/balloon.h	Tue Aug 02 18:04:28 2005 +0000
     3.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/balloon.h	Tue Aug 02 19:04:13 2005 +0000
     3.3 @@ -48,4 +48,7 @@ extern spinlock_t balloon_lock;
     3.4  #define balloon_lock(__flags)   spin_lock_irqsave(&balloon_lock, __flags)
     3.5  #define balloon_unlock(__flags) spin_unlock_irqrestore(&balloon_lock, __flags)
     3.6  
     3.7 +/* Init Function - Try to set up our watcher, if not already set. */
     3.8 +void balloon_init_watcher(void);
     3.9 +
    3.10  #endif /* __ASM_BALLOON_H__ */