aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2007-09-27 16:21:43 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-14 00:53:11 -0400
commitfa7744dbb69c06b69c7449063c440d8a53df9e6c (patch)
treea81c6103c0eec3aa21d26c419fd072b6e96fd5a7 /arch/sparc/kernel
parente8dd16129fad13e5b8b05b6a0a02d10d06f30301 (diff)
[SPARC/64]: Prepare to remove of_platform_driver name.
The name field of of_platform_driver is just copied into the included device_driver. By not overriding an already initialised device_driver name, we can convert the drivers over time to stop using the of_platform_driver name. Also we were not copying the owner field from of_platform_driver, so do the same with it. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r--arch/sparc/kernel/of_device.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c
index 36383f73d685..fb2caef79cec 100644
--- a/arch/sparc/kernel/of_device.c
+++ b/arch/sparc/kernel/of_device.c
@@ -588,7 +588,10 @@ __setup("of_debug=", of_debug);
588int of_register_driver(struct of_platform_driver *drv, struct bus_type *bus) 588int of_register_driver(struct of_platform_driver *drv, struct bus_type *bus)
589{ 589{
590 /* initialize common driver fields */ 590 /* initialize common driver fields */
591 drv->driver.name = drv->name; 591 if (!drv->driver.name)
592 drv->driver.name = drv->name;
593 if (!drv->driver.owner)
594 drv->driver.owner = drv->owner;
592 drv->driver.bus = bus; 595 drv->driver.bus = bus;
593 596
594 /* register with core */ 597 /* register with core */