From: Akinobu Mita Date: Thu, 17 Jul 2008 19:16:35 +0000 (+0200) Subject: dio: use dio_match_device() in dio_bus_match() X-Git-Tag: v2.6.27-rc1~972 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=18c993629a5a5938a032f04a698d15122550593d;p=linux-2.6-omap-h63xx.git dio: use dio_match_device() in dio_bus_match() dio_bus_match() can use dio_match_device(). Signed-off-by: Akinobu Mita Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Torvalds --- diff --git a/drivers/dio/dio-driver.c b/drivers/dio/dio-driver.c index 8cd8507b1a8..9c0c9afcd0a 100644 --- a/drivers/dio/dio-driver.c +++ b/drivers/dio/dio-driver.c @@ -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; }