diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-11-14 22:43:30 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-11-20 00:35:32 -0500 |
commit | 96081cdfae35c1e332be42d89dee278c72d8915d (patch) | |
tree | 112fb46429eb17ebc63558bd56790126a428253a | |
parent | d56b1b9d48fe266685eb6025c979150e86bb2c6d (diff) |
drm/drm_fb_helper: Remove unnecessary braces
Remove unnecessary braces to silence the following type of
checkpatch warnings:
WARNING: braces {} are not necessary for single statement blocks
WARNING: braces {} are not necessary for any arm of this statement
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/drm_fb_helper.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 07cba5af59f0..8c2de020e8eb 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c | |||
@@ -732,9 +732,9 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper, | |||
732 | 732 | ||
733 | /* if driver picks 8 or 16 by default use that | 733 | /* if driver picks 8 or 16 by default use that |
734 | for both depth/bpp */ | 734 | for both depth/bpp */ |
735 | if (preferred_bpp != sizes.surface_bpp) { | 735 | if (preferred_bpp != sizes.surface_bpp) |
736 | sizes.surface_depth = sizes.surface_bpp = preferred_bpp; | 736 | sizes.surface_depth = sizes.surface_bpp = preferred_bpp; |
737 | } | 737 | |
738 | /* first up get a count of crtcs now in use and new min/maxes width/heights */ | 738 | /* first up get a count of crtcs now in use and new min/maxes width/heights */ |
739 | for (i = 0; i < fb_helper->connector_count; i++) { | 739 | for (i = 0; i < fb_helper->connector_count; i++) { |
740 | struct drm_fb_helper_connector *fb_helper_conn = fb_helper->connector_info[i]; | 740 | struct drm_fb_helper_connector *fb_helper_conn = fb_helper->connector_info[i]; |
@@ -802,15 +802,13 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper, | |||
802 | info = fb_helper->fbdev; | 802 | info = fb_helper->fbdev; |
803 | 803 | ||
804 | /* set the fb pointer */ | 804 | /* set the fb pointer */ |
805 | for (i = 0; i < fb_helper->crtc_count; i++) { | 805 | for (i = 0; i < fb_helper->crtc_count; i++) |
806 | fb_helper->crtc_info[i].mode_set.fb = fb_helper->fb; | 806 | fb_helper->crtc_info[i].mode_set.fb = fb_helper->fb; |
807 | } | ||
808 | 807 | ||
809 | if (new_fb) { | 808 | if (new_fb) { |
810 | info->var.pixclock = 0; | 809 | info->var.pixclock = 0; |
811 | if (register_framebuffer(info) < 0) { | 810 | if (register_framebuffer(info) < 0) |
812 | return -EINVAL; | 811 | return -EINVAL; |
813 | } | ||
814 | 812 | ||
815 | dev_info(fb_helper->dev->dev, "fb%d: %s frame buffer device\n", | 813 | dev_info(fb_helper->dev->dev, "fb%d: %s frame buffer device\n", |
816 | info->node, info->fix.id); | 814 | info->node, info->fix.id); |
@@ -1010,11 +1008,11 @@ static bool drm_connector_enabled(struct drm_connector *connector, bool strict) | |||
1010 | { | 1008 | { |
1011 | bool enable; | 1009 | bool enable; |
1012 | 1010 | ||
1013 | if (strict) { | 1011 | if (strict) |
1014 | enable = connector->status == connector_status_connected; | 1012 | enable = connector->status == connector_status_connected; |
1015 | } else { | 1013 | else |
1016 | enable = connector->status != connector_status_disconnected; | 1014 | enable = connector->status != connector_status_disconnected; |
1017 | } | 1015 | |
1018 | return enable; | 1016 | return enable; |
1019 | } | 1017 | } |
1020 | 1018 | ||
@@ -1199,9 +1197,8 @@ static int drm_pick_crtcs(struct drm_fb_helper *fb_helper, | |||
1199 | for (c = 0; c < fb_helper->crtc_count; c++) { | 1197 | for (c = 0; c < fb_helper->crtc_count; c++) { |
1200 | crtc = &fb_helper->crtc_info[c]; | 1198 | crtc = &fb_helper->crtc_info[c]; |
1201 | 1199 | ||
1202 | if ((encoder->possible_crtcs & (1 << c)) == 0) { | 1200 | if ((encoder->possible_crtcs & (1 << c)) == 0) |
1203 | continue; | 1201 | continue; |
1204 | } | ||
1205 | 1202 | ||
1206 | for (o = 0; o < n; o++) | 1203 | for (o = 0; o < n; o++) |
1207 | if (best_crtcs[o] == crtc) | 1204 | if (best_crtcs[o] == crtc) |
@@ -1327,9 +1324,9 @@ bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel) | |||
1327 | /* | 1324 | /* |
1328 | * we shouldn't end up with no modes here. | 1325 | * we shouldn't end up with no modes here. |
1329 | */ | 1326 | */ |
1330 | if (count == 0) { | 1327 | if (count == 0) |
1331 | dev_info(fb_helper->dev->dev, "No connectors reported connected with modes\n"); | 1328 | dev_info(fb_helper->dev->dev, "No connectors reported connected with modes\n"); |
1332 | } | 1329 | |
1333 | drm_setup_crtcs(fb_helper); | 1330 | drm_setup_crtcs(fb_helper); |
1334 | 1331 | ||
1335 | return drm_fb_helper_single_fb_probe(fb_helper, bpp_sel); | 1332 | return drm_fb_helper_single_fb_probe(fb_helper, bpp_sel); |