Преглед на файлове

[AGPGART] Loop cleanup

The loop contains a command that is only used in the last iteration. I moved the command outside the loop.
Compile-tested

Signed-off-by: Daniel Marjamki <daniel.marjamaki at comhem.se>
Signed-off-by: Dave Jones <davej@redhat.com>
Daniel =?ISO-8859-1?Q?Marjam=E4ki преди 19 години
родител
ревизия
496ebd3864
променени са 1 файла, в които са добавени 1 реда и са изтрити 3 реда
  1. 1 3
      drivers/char/agp/isoch.c

+ 1 - 3
drivers/char/agp/isoch.c

@@ -218,10 +218,8 @@ static int agp_3_5_isochronous_node_enable(struct agp_bridge_data *bridge,
 			master[cdev].rq *= (1 << (master[cdev].y - 1));
 			master[cdev].rq *= (1 << (master[cdev].y - 1));
 
 
 		tot_rq += master[cdev].rq;
 		tot_rq += master[cdev].rq;
-
-		if (cdev == ndevs-1)
-			master[cdev].n += rem;
 	}
 	}
+	master[ndevs-1].n += rem;
 
 
 	/* Figure the number of isochronous and asynchronous RQ slots the
 	/* Figure the number of isochronous and asynchronous RQ slots the
 	 * target is providing. */
 	 * target is providing. */