diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-02-01 05:38:23 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-02-03 04:51:47 -0500 |
commit | 4cae5b84628d5df76247d494e51b89d07e28e6aa (patch) | |
tree | e68bd5e5da920e4f1bae8d15c91332702c06d8d7 /drivers/gpu | |
parent | a1b7736dac5f2d5876e68c47a0fce3f423840070 (diff) |
drm: add proper return value for drm_mode_crtc_set_gamma_size
drm_mode_crtc_set_gamma_size returns boolean true for success
and false for failure. This is not very kernel conform, so
change it to return 0 for success and a propert error code
otherwise. Noone checks the return value, so no users have to
be fixed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 33ebe291d189..df6e41356809 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c | |||
@@ -3024,7 +3024,7 @@ void drm_mode_connector_detach_encoder(struct drm_connector *connector, | |||
3024 | } | 3024 | } |
3025 | EXPORT_SYMBOL(drm_mode_connector_detach_encoder); | 3025 | EXPORT_SYMBOL(drm_mode_connector_detach_encoder); |
3026 | 3026 | ||
3027 | bool drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc, | 3027 | int drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc, |
3028 | int gamma_size) | 3028 | int gamma_size) |
3029 | { | 3029 | { |
3030 | crtc->gamma_size = gamma_size; | 3030 | crtc->gamma_size = gamma_size; |
@@ -3032,10 +3032,10 @@ bool drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc, | |||
3032 | crtc->gamma_store = kzalloc(gamma_size * sizeof(uint16_t) * 3, GFP_KERNEL); | 3032 | crtc->gamma_store = kzalloc(gamma_size * sizeof(uint16_t) * 3, GFP_KERNEL); |
3033 | if (!crtc->gamma_store) { | 3033 | if (!crtc->gamma_store) { |
3034 | crtc->gamma_size = 0; | 3034 | crtc->gamma_size = 0; |
3035 | return false; | 3035 | return -ENOMEM; |
3036 | } | 3036 | } |
3037 | 3037 | ||
3038 | return true; | 3038 | return 0; |
3039 | } | 3039 | } |
3040 | EXPORT_SYMBOL(drm_mode_crtc_set_gamma_size); | 3040 | EXPORT_SYMBOL(drm_mode_crtc_set_gamma_size); |
3041 | 3041 | ||