]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
dio: use dio_match_device() in dio_bus_match()
authorAkinobu Mita <akinobu.mita@gmail.com>
Thu, 17 Jul 2008 19:16:35 +0000 (21:16 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 21 Jul 2008 00:24:40 +0000 (17:24 -0700)
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/dio/dio-driver.c

index 8cd8507b1a8ae4e76662101b4a55c513ec91e14e..9c0c9afcd0ac37d6624640c24e917afe48cc9303 100644 (file)
@@ -119,19 +119,7 @@ static int dio_bus_match(struct device *dev, struct device_driver *drv)
        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;
 }