From 1061db63dd5a4e971d424e85096c6566a6adcaf8 Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 5 Jan 2006 14:33:35 +0000 Subject: [PATCH] --- yaml --- r: 18377 b: refs/heads/master c: 5c0784c350516856ed15deb6adf6b053bf427792 h: refs/heads/master i: 18375: 5d198f6130aecedccdcac5a8f6d7a4fbda6b8b06 v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-integrator/lm.c | 36 ++++++++++++++--------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/[refs] b/[refs] index ae82104a1eec..736bd4d3745e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 306955be37dd1b1f232f19766227ccccb83f7873 +refs/heads/master: 5c0784c350516856ed15deb6adf6b053bf427792 diff --git a/trunk/arch/arm/mach-integrator/lm.c b/trunk/arch/arm/mach-integrator/lm.c index 5b41e3a724e1..622cdc4212dd 100644 --- a/trunk/arch/arm/mach-integrator/lm.c +++ b/trunk/arch/arm/mach-integrator/lm.c @@ -22,20 +22,6 @@ static int lm_match(struct device *dev, struct device_driver *drv) return 1; } -static struct bus_type lm_bustype = { - .name = "logicmodule", - .match = lm_match, -// .suspend = lm_suspend, -// .resume = lm_resume, -}; - -static int __init lm_init(void) -{ - return bus_register(&lm_bustype); -} - -postcore_initcall(lm_init); - static int lm_bus_probe(struct device *dev) { struct lm_device *lmdev = to_lm_device(dev); @@ -49,16 +35,30 @@ static int lm_bus_remove(struct device *dev) struct lm_device *lmdev = to_lm_device(dev); struct lm_driver *lmdrv = to_lm_driver(dev->driver); - lmdrv->remove(lmdev); + if (lmdrv->remove) + lmdrv->remove(lmdev); return 0; } +static struct bus_type lm_bustype = { + .name = "logicmodule", + .match = lm_match, + .probe = lm_bus_probe, + .remove = lm_bus_remove, +// .suspend = lm_bus_suspend, +// .resume = lm_bus_resume, +}; + +static int __init lm_init(void) +{ + return bus_register(&lm_bustype); +} + +postcore_initcall(lm_init); + int lm_driver_register(struct lm_driver *drv) { drv->drv.bus = &lm_bustype; - drv->drv.probe = lm_bus_probe; - drv->drv.remove = lm_bus_remove; - return driver_register(&drv->drv); }