diff options
author | Gjorgji Rosikopulos <grosikopulos@mm-sol.com> | 2016-03-31 14:12:45 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-03-31 20:07:59 +0300 |
commit | 1472ec67f734d9707d4758fddd4787113fe0b0b2 (patch) | |
tree | f37833fd54c4ecbedfd29e74b2506a61b124d1b5 /drivers/staging/greybus/gb-camera.h | |
parent | a7be84613acc4f732f3aa9ab28da7e2e3a6bab0b (diff) | |
download | linux-1472ec67f734d9707d4758fddd4787113fe0b0b2.tar.xz |
greybus: camera: Use pointer for gb camera module ops
No need to duplicate module ops on every registration.
NOTE: Change should be along merged with:
"msm: camera: Change gb_camera_module ops to pointer"
Signed-off-by: Gjorgji Rosikopulos <grosikopulos@mm-sol.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/gb-camera.h')
-rw-r--r-- | drivers/staging/greybus/gb-camera.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/greybus/gb-camera.h b/drivers/staging/greybus/gb-camera.h index 0a48a16b675e..273b4fa6dd4f 100644 --- a/drivers/staging/greybus/gb-camera.h +++ b/drivers/staging/greybus/gb-camera.h @@ -36,14 +36,14 @@ struct gb_camera_ops { struct gb_camera_module { void *priv; - struct gb_camera_ops ops; + const struct gb_camera_ops *ops; struct list_head list; /* Global list */ }; #define gb_camera_call(f, op, args...) \ - ((!(f) ? -ENODEV : ((f)->ops.op) ? \ - (f)->ops.op((f)->priv, ##args) : -ENOIOCTLCMD)) + (!(f) ? -ENODEV : (((f)->ops->op) ? \ + (f)->ops->op((f)->priv, ##args) : -ENOIOCTLCMD)) int gb_camera_register(struct gb_camera_module *module); int gb_camera_unregister(struct gb_camera_module *module); |