diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2016-02-26 04:51:06 -0500 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2016-03-02 11:31:03 -0500 |
commit | c8a3b2ae07130042682bc8e031bcfbae3754463d (patch) | |
tree | 6594793d6229f8cacbba4667d80000eb1abee438 /drivers/gpu/drm | |
parent | 06a9dc65afbd9d9e81ee6352a13f968e0540237e (diff) |
drm/bridge: Make (pre/post) enable/disable callbacks optional
Instead of forcing bridges to implement empty callbacks make them all
optional.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/drm_bridge.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c index bd93453afa61..b3654404abd0 100644 --- a/drivers/gpu/drm/drm_bridge.c +++ b/drivers/gpu/drm/drm_bridge.c | |||
@@ -186,7 +186,8 @@ void drm_bridge_disable(struct drm_bridge *bridge) | |||
186 | 186 | ||
187 | drm_bridge_disable(bridge->next); | 187 | drm_bridge_disable(bridge->next); |
188 | 188 | ||
189 | bridge->funcs->disable(bridge); | 189 | if (bridge->funcs->disable) |
190 | bridge->funcs->disable(bridge); | ||
190 | } | 191 | } |
191 | EXPORT_SYMBOL(drm_bridge_disable); | 192 | EXPORT_SYMBOL(drm_bridge_disable); |
192 | 193 | ||
@@ -206,7 +207,8 @@ void drm_bridge_post_disable(struct drm_bridge *bridge) | |||
206 | if (!bridge) | 207 | if (!bridge) |
207 | return; | 208 | return; |
208 | 209 | ||
209 | bridge->funcs->post_disable(bridge); | 210 | if (bridge->funcs->post_disable) |
211 | bridge->funcs->post_disable(bridge); | ||
210 | 212 | ||
211 | drm_bridge_post_disable(bridge->next); | 213 | drm_bridge_post_disable(bridge->next); |
212 | } | 214 | } |
@@ -256,7 +258,8 @@ void drm_bridge_pre_enable(struct drm_bridge *bridge) | |||
256 | 258 | ||
257 | drm_bridge_pre_enable(bridge->next); | 259 | drm_bridge_pre_enable(bridge->next); |
258 | 260 | ||
259 | bridge->funcs->pre_enable(bridge); | 261 | if (bridge->funcs->pre_enable) |
262 | bridge->funcs->pre_enable(bridge); | ||
260 | } | 263 | } |
261 | EXPORT_SYMBOL(drm_bridge_pre_enable); | 264 | EXPORT_SYMBOL(drm_bridge_pre_enable); |
262 | 265 | ||
@@ -276,7 +279,8 @@ void drm_bridge_enable(struct drm_bridge *bridge) | |||
276 | if (!bridge) | 279 | if (!bridge) |
277 | return; | 280 | return; |
278 | 281 | ||
279 | bridge->funcs->enable(bridge); | 282 | if (bridge->funcs->enable) |
283 | bridge->funcs->enable(bridge); | ||
280 | 284 | ||
281 | drm_bridge_enable(bridge->next); | 285 | drm_bridge_enable(bridge->next); |
282 | } | 286 | } |