[PATCH 4/9] fs: use bus_for_each_driver

Sascha Hauer s.hauer at pengutronix.de
Sun Sep 29 06:04:55 EDT 2013


Instead of using for_each_driver and testing for the bus type.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 fs/fs.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/fs.c b/fs/fs.c
index 4618b4f..3434134 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -1269,10 +1269,7 @@ static const char *detect_fs(const char *filename)
 	if (type == filetype_unknown)
 		return NULL;
 
-	for_each_driver(drv) {
-		if (drv->bus != &fs_bus)
-			continue;
-
+	bus_for_each_driver(&fs_bus, drv) {
 		fdrv = drv_to_fs_driver(drv);
 
 		if (type == fdrv->type)
-- 
1.8.4.rc3




More information about the barebox mailing list