aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/ibmebus.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-04 18:51:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-04 18:51:45 -0400
commit74b9272bbedf45cb01a048217830d64d59aaa73b (patch)
tree11cf66b529d4861edd03d16f97c8178e9cfd9f77 /arch/powerpc/kernel/ibmebus.c
parentf5b63ac0f77ecab46796ba5d368ea5dd51834e6e (diff)
parent6dd18e4684f3d188277bbbc27545248487472108 (diff)
Merge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux
Pull device tree updates from Grant Likely: "This branch contains the following changes: - Removal of CONFIG_OF_DEVICE, it is always enabled by CONFIG_OF - Remove #ifdef from linux/of_platform.h to increase compiler syntax coverage - Bug fix for address decoding on Bimini and js2x powerpc platforms. - miscellaneous binding changes One note on the above. The binding changes going in from all kinds of different trees has gotten rather out of hand. I picked up some during this cycle, but even going though my tree isn't a great fit. Ian Campbell has prototyped splitting the bindings and .dtb files into a separate repository. The plan is to migrate to using that sometime in the next few kernel releases which should get rid of a lot of the churn on binding docs and .dts files" * tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux: of: Fix address decoding on Bimini and js2x machines of: remove CONFIG_OF_DEVICE usb: chipidea: depend on CONFIG_OF instead of CONFIG_OF_DEVICE of: remove of_platform_driver ibmebus: convert of_platform_driver to platform_driver driver core: move to_platform_driver to platform_device.h mfd: DT bindings for the palmas family MFD ARM: dts: omap3-devkit8000: fix NAND memory binding of/base: fix typos of: remove #ifdef from linux/of_platform.h
Diffstat (limited to 'arch/powerpc/kernel/ibmebus.c')
-rw-r--r--arch/powerpc/kernel/ibmebus.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c
index 8220baa46faf..16a7c2326d48 100644
--- a/arch/powerpc/kernel/ibmebus.c
+++ b/arch/powerpc/kernel/ibmebus.c
@@ -205,7 +205,7 @@ static int ibmebus_create_devices(const struct of_device_id *matches)
205 return ret; 205 return ret;
206} 206}
207 207
208int ibmebus_register_driver(struct of_platform_driver *drv) 208int ibmebus_register_driver(struct platform_driver *drv)
209{ 209{
210 /* If the driver uses devices that ibmebus doesn't know, add them */ 210 /* If the driver uses devices that ibmebus doesn't know, add them */
211 ibmebus_create_devices(drv->driver.of_match_table); 211 ibmebus_create_devices(drv->driver.of_match_table);
@@ -215,7 +215,7 @@ int ibmebus_register_driver(struct of_platform_driver *drv)
215} 215}
216EXPORT_SYMBOL(ibmebus_register_driver); 216EXPORT_SYMBOL(ibmebus_register_driver);
217 217
218void ibmebus_unregister_driver(struct of_platform_driver *drv) 218void ibmebus_unregister_driver(struct platform_driver *drv)
219{ 219{
220 driver_unregister(&drv->driver); 220 driver_unregister(&drv->driver);
221} 221}
@@ -338,11 +338,10 @@ static int ibmebus_bus_bus_match(struct device *dev, struct device_driver *drv)
338static int ibmebus_bus_device_probe(struct device *dev) 338static int ibmebus_bus_device_probe(struct device *dev)
339{ 339{
340 int error = -ENODEV; 340 int error = -ENODEV;
341 struct of_platform_driver *drv; 341 struct platform_driver *drv;
342 struct platform_device *of_dev; 342 struct platform_device *of_dev;
343 const struct of_device_id *match;
344 343
345 drv = to_of_platform_driver(dev->driver); 344 drv = to_platform_driver(dev->driver);
346 of_dev = to_platform_device(dev); 345 of_dev = to_platform_device(dev);
347 346
348 if (!drv->probe) 347 if (!drv->probe)
@@ -350,9 +349,8 @@ static int ibmebus_bus_device_probe(struct device *dev)
350 349
351 of_dev_get(of_dev); 350 of_dev_get(of_dev);
352 351
353 match = of_match_device(drv->driver.of_match_table, dev); 352 if (of_driver_match_device(dev, dev->driver))
354 if (match) 353 error = drv->probe(of_dev);
355 error = drv->probe(of_dev, match);
356 if (error) 354 if (error)
357 of_dev_put(of_dev); 355 of_dev_put(of_dev);
358 356
@@ -362,7 +360,7 @@ static int ibmebus_bus_device_probe(struct device *dev)
362static int ibmebus_bus_device_remove(struct device *dev) 360static int ibmebus_bus_device_remove(struct device *dev)
363{ 361{
364 struct platform_device *of_dev = to_platform_device(dev); 362 struct platform_device *of_dev = to_platform_device(dev);
365 struct of_platform_driver *drv = to_of_platform_driver(dev->driver); 363 struct platform_driver *drv = to_platform_driver(dev->driver);
366 364
367 if (dev->driver && drv->remove) 365 if (dev->driver && drv->remove)
368 drv->remove(of_dev); 366 drv->remove(of_dev);
@@ -372,7 +370,7 @@ static int ibmebus_bus_device_remove(struct device *dev)
372static void ibmebus_bus_device_shutdown(struct device *dev) 370static void ibmebus_bus_device_shutdown(struct device *dev)
373{ 371{
374 struct platform_device *of_dev = to_platform_device(dev); 372 struct platform_device *of_dev = to_platform_device(dev);
375 struct of_platform_driver *drv = to_of_platform_driver(dev->driver); 373 struct platform_driver *drv = to_platform_driver(dev->driver);
376 374
377 if (dev->driver && drv->shutdown) 375 if (dev->driver && drv->shutdown)
378 drv->shutdown(of_dev); 376 drv->shutdown(of_dev);
@@ -419,7 +417,7 @@ struct device_attribute ibmebus_bus_device_attrs[] = {
419static int ibmebus_bus_legacy_suspend(struct device *dev, pm_message_t mesg) 417static int ibmebus_bus_legacy_suspend(struct device *dev, pm_message_t mesg)
420{ 418{
421 struct platform_device *of_dev = to_platform_device(dev); 419 struct platform_device *of_dev = to_platform_device(dev);
422 struct of_platform_driver *drv = to_of_platform_driver(dev->driver); 420 struct platform_driver *drv = to_platform_driver(dev->driver);
423 int ret = 0; 421 int ret = 0;
424 422
425 if (dev->driver && drv->suspend) 423 if (dev->driver && drv->suspend)
@@ -430,7 +428,7 @@ static int ibmebus_bus_legacy_suspend(struct device *dev, pm_message_t mesg)
430static int ibmebus_bus_legacy_resume(struct device *dev) 428static int ibmebus_bus_legacy_resume(struct device *dev)
431{ 429{
432 struct platform_device *of_dev = to_platform_device(dev); 430 struct platform_device *of_dev = to_platform_device(dev);
433 struct of_platform_driver *drv = to_of_platform_driver(dev->driver); 431 struct platform_driver *drv = to_platform_driver(dev->driver);
434 int ret = 0; 432 int ret = 0;
435 433
436 if (dev->driver && drv->resume) 434 if (dev->driver && drv->resume)