diff options
author | Kulikov Vasiliy <segooon@gmail.com> | 2010-06-28 07:54:56 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-07-20 11:14:25 -0400 |
commit | 04ad327f277ec3bc3c05f5a5c19d58600882d38e (patch) | |
tree | 662c4326b43397fd9019000afabc3524d9f08a2d /drivers | |
parent | 3c58141165bc2476a5851142f5199d63c39c30c8 (diff) |
drm: i915: use ARRAY_SIZE
Change sizeof(x) / sizeof(*x) to ARRAY_SIZE(x).
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/intel_sdvo.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_tv.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 76993ac16cc1..03c231be2273 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c | |||
@@ -392,13 +392,13 @@ static void intel_sdvo_debug_write(struct intel_encoder *intel_encoder, u8 cmd, | |||
392 | DRM_LOG_KMS("%02X ", ((u8 *)args)[i]); | 392 | DRM_LOG_KMS("%02X ", ((u8 *)args)[i]); |
393 | for (; i < 8; i++) | 393 | for (; i < 8; i++) |
394 | DRM_LOG_KMS(" "); | 394 | DRM_LOG_KMS(" "); |
395 | for (i = 0; i < sizeof(sdvo_cmd_names) / sizeof(sdvo_cmd_names[0]); i++) { | 395 | for (i = 0; i < ARRAY_SIZE(sdvo_cmd_names); i++) { |
396 | if (cmd == sdvo_cmd_names[i].cmd) { | 396 | if (cmd == sdvo_cmd_names[i].cmd) { |
397 | DRM_LOG_KMS("(%s)", sdvo_cmd_names[i].name); | 397 | DRM_LOG_KMS("(%s)", sdvo_cmd_names[i].name); |
398 | break; | 398 | break; |
399 | } | 399 | } |
400 | } | 400 | } |
401 | if (i == sizeof(sdvo_cmd_names)/ sizeof(sdvo_cmd_names[0])) | 401 | if (i == ARRAY_SIZE(sdvo_cmd_names)) |
402 | DRM_LOG_KMS("(%02X)", cmd); | 402 | DRM_LOG_KMS("(%02X)", cmd); |
403 | DRM_LOG_KMS("\n"); | 403 | DRM_LOG_KMS("\n"); |
404 | } | 404 | } |
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index 6d553c29d106..d2d4e4045ca9 100644 --- a/drivers/gpu/drm/i915/intel_tv.c +++ b/drivers/gpu/drm/i915/intel_tv.c | |||
@@ -1424,7 +1424,7 @@ intel_tv_get_modes(struct drm_connector *connector) | |||
1424 | int j, count = 0; | 1424 | int j, count = 0; |
1425 | u64 tmp; | 1425 | u64 tmp; |
1426 | 1426 | ||
1427 | for (j = 0; j < sizeof(input_res_table) / sizeof(input_res_table[0]); | 1427 | for (j = 0; j < ARRAY_SIZE(input_res_table); |
1428 | j++) { | 1428 | j++) { |
1429 | struct input_res *input = &input_res_table[j]; | 1429 | struct input_res *input = &input_res_table[j]; |
1430 | unsigned int hactive_s = input->w; | 1430 | unsigned int hactive_s = input->w; |