win-pvdrivers

diff xenpci/xenbus.c @ 1019:df03fde445b8

tidyup xenpci
author James Harper <james.harper@bendigoit.com.au>
date Tue Feb 12 20:45:25 2013 +1100 (2013-02-12)
parents 4f7d5a8636bd
children cd72cd0e1c19
line diff
     1.1 --- a/xenpci/xenbus.c	Tue Feb 12 20:45:08 2013 +1100
     1.2 +++ b/xenpci/xenbus.c	Tue Feb 12 20:45:25 2013 +1100
     1.3 @@ -636,12 +636,11 @@ XenBus_AddWatch(
     1.4  
     1.5  char *
     1.6  XenBus_RemWatch(
     1.7 -  PVOID Context,
     1.8 -  xenbus_transaction_t xbt,
     1.9 -  char *Path,
    1.10 -  PXN_WATCH_CALLBACK ServiceRoutine,
    1.11 -  PVOID ServiceContext)
    1.12 -{
    1.13 +    PVOID Context,
    1.14 +    xenbus_transaction_t xbt,
    1.15 +    char *Path,
    1.16 +    PXN_WATCH_CALLBACK ServiceRoutine,
    1.17 +    PVOID ServiceContext) {
    1.18    PXENPCI_DEVICE_DATA xpdd = Context;
    1.19    char *msg;
    1.20    int i;
    1.21 @@ -652,20 +651,17 @@ XenBus_RemWatch(
    1.22  
    1.23    // check that Path < 128 chars
    1.24  
    1.25 -  for (i = 0; i < MAX_WATCH_ENTRIES; i++)
    1.26 -  {
    1.27 +  for (i = 0; i < MAX_WATCH_ENTRIES; i++) {
    1.28      if (xpdd->XenBus_WatchEntries[i].Active
    1.29 -      && !strcmp(xpdd->XenBus_WatchEntries[i].Path, Path)
    1.30 -      && xpdd->XenBus_WatchEntries[i].ServiceRoutine == ServiceRoutine
    1.31 -      && xpdd->XenBus_WatchEntries[i].ServiceContext == ServiceContext)
    1.32 -    {
    1.33 +        && !strcmp(xpdd->XenBus_WatchEntries[i].Path, Path)
    1.34 +        && xpdd->XenBus_WatchEntries[i].ServiceRoutine == ServiceRoutine
    1.35 +        && xpdd->XenBus_WatchEntries[i].ServiceContext == ServiceContext) {
    1.36        KdPrint((__DRIVER_NAME "     Match\n"));
    1.37        break;
    1.38      }
    1.39    }
    1.40  
    1.41 -  if (i == MAX_WATCH_ENTRIES)
    1.42 -  {
    1.43 +  if (i == MAX_WATCH_ENTRIES) {
    1.44      ExReleaseFastMutex(&xpdd->xb_watch_mutex);
    1.45      KdPrint((__DRIVER_NAME "     Watch not set for %s - can't remove\n", Path));
    1.46      return NULL;