[patch 28/29] dio: use dio_match_device() in dio_bus_match()

Previous thread: [patch 29/29] initrd: Fix virtual/physical mix-up in overwrite test by Geert Uytterhoeven on Thursday, July 17, 2008 - 12:16 pm. (6 messages)

Next thread: [patch 27/29] arch/m68k/mm/sun3mmu.c: Eliminate NULL test and memset after alloc_bootmem by Geert Uytterhoeven on Thursday, July 17, 2008 - 12:16 pm. (1 message)
From: Geert Uytterhoeven
Date: Thursday, July 17, 2008 - 12:16 pm

From: Akinobu Mita <akinobu.mita@gmail.com>

dio_bus_match() can use dio_match_device().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drivers/dio/dio-driver.c |   14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

--- a/drivers/dio/dio-driver.c
+++ b/drivers/dio/dio-driver.c
@@ -119,19 +119,7 @@ static int dio_bus_match(struct device *
 	if (!ids)
 		return 0;
 
-	while (ids->id) {
-		if (ids->id == DIO_WILDCARD)
-			return 1;
-		if (DIO_NEEDSSECID(ids->id & 0xff)) {
-			if (ids->id == d->id)
-				return 1;
-		} else {
-			if ((ids->id & 0xff) == (d->id & 0xff))
-				return 1;
-		}
-		ids++;
-	}
-	return 0;
+	return dio_match_device(ids, d) ? 1 : 0;
 }
 
 

-- 
Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

--

Previous thread: [patch 29/29] initrd: Fix virtual/physical mix-up in overwrite test by Geert Uytterhoeven on Thursday, July 17, 2008 - 12:16 pm. (6 messages)

Next thread: [patch 27/29] arch/m68k/mm/sun3mmu.c: Eliminate NULL test and memset after alloc_bootmem by Geert Uytterhoeven on Thursday, July 17, 2008 - 12:16 pm. (1 message)