From 7ce8a13c26eb47a0aa115f9001a9dcc7805085e9 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sat, 3 Nov 2012 16:11:04 +0100 Subject: [PATCH] bus_for_each_device/bus_for_each_driver: add () to allow use &bus Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Signed-off-by: Sascha Hauer --- include/driver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/driver.h b/include/driver.h index f8d815c61..6ae7ffdab 100644 --- a/include/driver.h +++ b/include/driver.h @@ -408,11 +408,11 @@ extern struct list_head bus_list; /* Iterate over all devices of a bus */ -#define bus_for_each_device(bus, dev) list_for_each_entry(dev, &bus->device_list, bus_list) +#define bus_for_each_device(bus, dev) list_for_each_entry(dev, &(bus)->device_list, bus_list) /* Iterate over all drivers of a bus */ -#define bus_for_each_driver(bus, drv) list_for_each_entry(drv, &bus->driver_list, bus_list) +#define bus_for_each_driver(bus, drv) list_for_each_entry(drv, &(bus)->driver_list, bus_list) extern struct bus_type platform_bus;