aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/of_device.c5
-rw-r--r--drivers/macintosh/smu.c4
2 files changed, 2 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c
index 22d83d4d1af5..9feeeef5a875 100644
--- a/arch/powerpc/kernel/of_device.c
+++ b/arch/powerpc/kernel/of_device.c
@@ -147,15 +147,12 @@ postcore_initcall(of_bus_driver_init);
147 147
148int of_register_driver(struct of_platform_driver *drv) 148int of_register_driver(struct of_platform_driver *drv)
149{ 149{
150 int count = 0;
151
152 /* initialize common driver fields */ 150 /* initialize common driver fields */
153 drv->driver.name = drv->name; 151 drv->driver.name = drv->name;
154 drv->driver.bus = &of_platform_bus_type; 152 drv->driver.bus = &of_platform_bus_type;
155 153
156 /* register with core */ 154 /* register with core */
157 count = driver_register(&drv->driver); 155 return driver_register(&drv->driver);
158 return count ? count : 1;
159} 156}
160 157
161void of_unregister_driver(struct of_platform_driver *drv) 158void of_unregister_driver(struct of_platform_driver *drv)
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index db2ae71d07ef..4eb05d7143d8 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -629,8 +629,6 @@ static struct of_platform_driver smu_of_platform_driver =
629 629
630static int __init smu_init_sysfs(void) 630static int __init smu_init_sysfs(void)
631{ 631{
632 int rc;
633
634 /* 632 /*
635 * Due to sysfs bogosity, a sysdev is not a real device, so 633 * Due to sysfs bogosity, a sysdev is not a real device, so
636 * we should in fact create both if we want sysdev semantics 634 * we should in fact create both if we want sysdev semantics
@@ -639,7 +637,7 @@ static int __init smu_init_sysfs(void)
639 * I'm a bit too far from figuring out how that works with those 637 * I'm a bit too far from figuring out how that works with those
640 * new chipsets, but that will come back and bite us 638 * new chipsets, but that will come back and bite us
641 */ 639 */
642 rc = of_register_driver(&smu_of_platform_driver); 640 of_register_driver(&smu_of_platform_driver);
643 return 0; 641 return 0;
644} 642}
645 643