summaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-gru/grufile.c
diff options
context:
space:
mode:
authorJack Steiner <steiner@sgi.com>2009-04-03 01:59:11 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-03 04:05:07 +0200
commit27ca8a7b2bdfb3e22e67fbd5df58e6b6f0bbcd48 (patch)
treec7fbe657ba4d31b1977b7247dd7626414246a1c3 /drivers/misc/sgi-gru/grufile.c
parentsgi-gru: macro for scanning all gru chiplets (diff)
downloadlinux-27ca8a7b2bdfb3e22e67fbd5df58e6b6f0bbcd48.tar.xz
linux-27ca8a7b2bdfb3e22e67fbd5df58e6b6f0bbcd48.zip
sgi-gru: fix bugs related to module unload of the GRU driver
Fix bugs related to module unload of the GRU driver. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc/sgi-gru/grufile.c')
-rw-r--r--drivers/misc/sgi-gru/grufile.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/misc/sgi-gru/grufile.c b/drivers/misc/sgi-gru/grufile.c
index b7a21ce91496..3e6e42d2f01b 100644
--- a/drivers/misc/sgi-gru/grufile.c
+++ b/drivers/misc/sgi-gru/grufile.c
@@ -440,7 +440,7 @@ exit1:
static void __exit gru_exit(void)
{
- int i, bid;
+ int i, bid, gid;
int order = get_order(sizeof(struct gru_state) *
GRU_CHIPLETS_PER_BLADE);
@@ -450,6 +450,9 @@ static void __exit gru_exit(void)
for (i = 0; i < GRU_CHIPLETS_PER_BLADE; i++)
free_irq(IRQ_GRU + i, NULL);
+ foreach_gid(gid)
+ gru_kservices_exit(GID_TO_GRU(gid));
+
for (bid = 0; bid < GRU_MAX_BLADES; bid++)
free_pages((unsigned long)gru_base[bid], order);