aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/ibmebus.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/ibmebus.c')
-rw-r--r--arch/powerpc/kernel/ibmebus.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c
index a9f31631a293..355257bb149d 100644
--- a/arch/powerpc/kernel/ibmebus.c
+++ b/arch/powerpc/kernel/ibmebus.c
@@ -201,8 +201,11 @@ static int ibmebus_create_devices(const struct of_device_id *matches)
201 201
202int ibmebus_register_driver(struct of_platform_driver *drv) 202int ibmebus_register_driver(struct of_platform_driver *drv)
203{ 203{
204 if (!drv->driver.of_match_table)
205 drv->driver.of_match_table = drv->match_table;
206
204 /* If the driver uses devices that ibmebus doesn't know, add them */ 207 /* If the driver uses devices that ibmebus doesn't know, add them */
205 ibmebus_create_devices(drv->match_table); 208 ibmebus_create_devices(drv->driver.of_match_table);
206 209
207 return of_register_driver(drv, &ibmebus_bus_type); 210 return of_register_driver(drv, &ibmebus_bus_type);
208} 211}