dm: core: device: add function: dev_get_driver_ops()
authorPrzemyslaw Marczak <p.marczak@samsung.com>
Wed, 15 Apr 2015 11:07:24 +0000 (13:07 +0200)
committerSimon Glass <sjg@chromium.org>
Wed, 22 Apr 2015 17:03:15 +0000 (11:03 -0600)
commitcc73d37b7f1edbbf03e2abcf5815bdd122e8baed
tree049e945aed984e4e1bbee25aa51145592bb24150
parentb7af1a2da767c0dd283ffce3d50efd36af32df14
dm: core: device: add function: dev_get_driver_ops()

This commit extends the driver model device's API by function:
- dev_get_driver_ops()

And this function returns the device's driver's operations if given:
- dev pointer, is non-NULL
- dev->driver->ops pointer, is non-NULL
in other case the, the NULL pointer is returned.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
drivers/core/device.c
include/dm/device.h